This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Tagged: ,

get_template_part conflict with bbPress

  • Creator
    Topic
  • #10893
    karlo
    Participant

    I have run in to what must be fixed on this forum https://github.com/themeblvd/Theme-Blvd-bbPress-Patch/issues/1

    But how?

    My fix:
    I put content-search.php from bbPress in to /child_theme_folder/bbpress/
    Then content-search.php from Jump Start in to /child_theme_folder
    In Jump Starts content-search.php I add a check for bbPress, if yes skip to its own content-results.php

    if ( is_bbpress() ) {
    	get_template_part( 'bbpress/content', 'search' );
    }

    seems to work so why bother thinking but there is a better way? – if this even holds water. Only checked with 2 posts 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #10894
    Jason Bobich
    Keymaster

    That bbPress patch plugin isn’t something I’ve created yet. At this point, it’s an issue I’m aware of, but I haven’t gotten around to tackling it yet. What you’re doing seems like a good option, though.

    #13628
    Joseph Sellers
    Participant

    I would love to see this fixed officially but this worked for now.

    #13629
    karlo
    Participant

    Until then and depending on how much you fiddle it might be best to improve bbPress conditional, what I did is not enough. If you disable bbPress, site go poof.

    if ( function_exists( 'is_bbpress' ) && is_bbpress() ) {
    ...stuff...
    }

    format is better.

    And for Jump Start widget areas where you cant use function_exists this seems to nail bbPress

    get_post_type() == 'topic' || get_post_type() == 'forum'

    If you use double quotes conditional works but when you edit you only see get_post_type() ==, I guess it breaks – may be local issue, I see sample code use double quotes, but single quotes works 100%.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.