[Resolved] BBPress forum root not taking into account Elements

Home Forums Support [Resolved] BBPress forum root not taking into account Elements

Home Forums Support BBPress forum root not taking into account Elements

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #666425
    Laurent

    Hi,

    I have bbpress and set the forum root on a WP Page in which I use BBP shortcode to display forums (method 2 of installing bbpress). I then set the GP Elements to content/sidebar and remove title. But I end up with a fullwidth page and title is still here. If I type something on the page it appears, and I’ve looked into the template files and it uses the GP ones as intended.

    Any idea what is happening ?

    Thanks

    GeneratePress 2.1.4
    GP Premium 1.7.2
    #666722
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can link us to the site in question?

    You can edit the original topic and use the private URL field.

    Let me know πŸ™‚

    #666918
    Laurent

    Hi,

    Site is protected but I opened it for this page, you’ll see no forums but you’ll see the layout. If you need more, I’ll grant you an access.

    Thanks

    #666981
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    What display rule did you use exactly? The page or the archive?

    #667066
    Laurent

    I have no display rules it’s not an Element as in Apparence -> Elements it’s on the Forums page, under the content where I can select what I want to be displayed and how (more of Deactivate Elements than Elements themselves).

    I have my forums set to slug = forums.
    I created a page with slug forums.
    In this page, I’ve set the page to “Content/Sidebar” but nothing happens. If I set remove Title, it doesnt work either.

    Unless I’m mistaken, that’s the procedure for installing bbpress right ?

    Thanks

    #667625
    Tom
    Lead Developer
    Lead Developer

    Ah, metabox values don’t work on index pages in WordPress. The same applies for the blog page for example.

    You’d be better off using the Elements module for this specific purpose.

    #667631
    Laurent

    Ahh….ok πŸ™‚ How can I achieve that with Elements Module ?

    #667950
    Tom
    Lead Developer
    Lead Developer

    First I would check to see if there Display Rules exist within the Display Rules tab when creating your Element.

    If that doesn’t work, we can use a filter. When you create a Header element, take note of the ID.

    Then do something like this:

    add_filter( 'generate_header_element_display', function( $display, $element_id ) {
        if ( 10 === $element_id ) {
            if ( function_exists( 'is_bbpress' ) && is_bbpress() ) {
                return true;
            }
        }
    
        return $display;
    }, 10, 2 );
    #668028
    Laurent

    Thanks that worked πŸ™‚

    #668506
    Tom
    Lead Developer
    Lead Developer
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.