Skip to:
Content
Pages
Categories
Search
Top
Bottom

Show single topic on homepage with shortcode or php


  • Stephen B
    Participant

    @wordpmoon12

    I want to show a single topic on my homepage, on top of the page.
    When I use the shortcode [bbp-single-topic id=$topic_id] it pulls the bbpress forum sidebar widget as well. I am not sure if it’s incompatibility with the theme or normal behavior.

    Is there PHP code I could use instead to pull a single topic? Maybe I could then use that to create a custom template for the homepage.

    Thanks in advance

Viewing 6 replies - 1 through 6 (of 6 total)

  • Robin W
    Moderator

    @robin-w

    ok, not totally sure I understand.

    so you are putting the actual topic_id in ?

    eg

    [bbp-single-topic id=265]

    and not sure I understand what ‘it pulls the bbpress forum sidebar widget ‘ means – do you have a link to a live example?


    Stephen B
    Participant

    @wordpmoon12

    Thanks for replying and yes, I am using the topic ID and it’s showing the correct topic.
    The issue is that the shortcode is displaying the forum sidebar in addition to the topic.
    You can see here a screenshot of the source code https://ibb.co/2PS9qW1


    Stephen B
    Participant

    @wordpmoon12

    You can see an example page now here:
    http://bit.ly/4eG3RLY
    The shortcode also uses the page title (where the shortcode is pasted) instead of the topic title.
    Is it because of incompatibility with the theme?


    Robin W
    Moderator

    @robin-w

    ok, thanks.

    I cannot see why it would do this, unless it thinks it is a bbpress page and should add the sidebar.

    Is it doing this for any bbpress shortcode – maybe as a test try some others and then come back


    Stephen B
    Participant

    @wordpmoon12

    Yes, I’ve tried the other shortcodes as well and the same issue happens with all of them


    Robin W
    Moderator

    @robin-w

    ok, I can only suggest you try another theme and confirm whether it is a theme issue – if so you may need to reach out to the theme authors.

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