Skip to:
Content
Pages
Categories
Search
Top
Bottom

First Post of Forum Topic On Page


  • erich199
    Participant

    @erich199

    I was curious if anyone has or knows of any function or shortcode that I can use that pulls the first topic from a specific forum and shows it on a page?


    @robin-w
    , does your bbpress shortcode plugin do this?

    I basically want to create a section on my homepage called “Announcements” and have the latest two topics from my forums with the Title and an excerpt from the post body included.

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

  • bolhachefe
    Participant

    @bolhachefe

    @erich199

    [bbp-single-topic id=$topic_id]

    More information at: https://codex.bbpress.org/features/shortcodes/#topics


    erich199
    Participant

    @erich199

    @bolhachefe,

    Thanks for the information. This does accomplish sort of what I want. I don’t want to feed it just a single topic. I would like it to post the two most recent topics in a specific forum. Perhaps I can hunt for this shortcode code and modify it.


    Robin W
    Moderator

    @robin-w

    I think my style pack plugin might do what you want

    bbp style pack

    then use

    [bsp-display-topic-index show=’1′ forum =’10’ template = ‘short’ show_stickies=’true’ noreply=’true’]

    see

    dashboard>settings>bbp style pack>shortcodes for how to use


    erich199
    Participant

    @erich199

    Hi @robin-w,

    That gets me close to the functionality. I managed to get it displayed properly. You can see at the top of the homepage at tidesofwar.net. I used the single topic shortcode and some css hacks to get it to display how I want it.

    The issue is I have to manually edit the page anytime I want the topic to change.


    Henry Chinaski
    Participant

    @henrychinaski45

    I’m interested in this too! Did you find the shortcode?


    Robin W
    Moderator

    @robin-w

    bit confused – the shortcode I gave you without the noreply should do what you require

    what is the exact shortcode you are using?


    erich199
    Participant

    @erich199

    Sorry I might not have explained what I’m trying to accomplish properly.

    The shortcode I’m currently using on my live site is this:
    [bbp-single-topic id=4657]

    Just the normal bbpress shortcode to show the content of the actual topic. I used some CSS code to remove the post form and any replies. So it shows only the first post in a topic which is what I want to display as news on my front page from different forums. The shortcode you listed does show the stickies but just the actual forum topic and not the content of the first post of that forum topic.

    I wasn’t sure if there was a shortcode that displays the content of the first post from “x” amount of topics from a specific forum.

    So on my page I have three codes that are pulling a single topic from 3 different forums.


    Robin W
    Moderator

    @robin-w

    there is a short code in my style pack above that does this as stated above 🙂


    erich199
    Participant

    @erich199

    @robin-w , I must have misread what you posted then. I’ll go back and take a look. I was using the shortcode [bsp-display-topic-index show=’1′ forum =’10’ template = ‘short’ show_stickies=’true’ noreply=’true’]


    Robin W
    Moderator

    @robin-w

    if it is not working, then 1. remove the norepy part and 2. make sure you type in thne line rather than copy it, as otherwise the apostrophes tend to get changed

    as above you have ’1′ not ‘1’

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