Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display Lead Topic only


  • ynteligent
    Participant

    @ynteligent

    Hello,

    I have a page, where I wanted to use shortcode [bbp-single-topic id=$topic_id]. I expected that only lead topic appears, but it does not. There is a lead topic with all replies.

    Is there any way how to display Lead topic only (no replies)?

    Thank you for any peply… Peter

    PS: I tried to use <?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?> but I did not find out how to use it with specific topic_id….

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

  • Robkk
    Moderator

    @robkk

    I expected that only lead topic appears, but it does not. There is a lead topic with all replies.

    That is how the shortcode should output. This is the description straight from the plugin for the function from the shortcode.

    Display the contents of a specific topic ID in an output buffer and return to ensure that post/page contents are displayed first.

    Is there any way how to display Lead topic only (no replies)?

    The best way is to probably make a new custom shortcode. I will test this out later today and see if I can just use something similar to the single reply shortcode, but just use the content-single-topic-lead.php template instead.


    ynteligent
    Participant

    @ynteligent

    I found this tricky solution yesterday evening too…

    I created new template page where I put complete code from content-single-topic-lead.php and added $topic_id into brackets () almost everywhere- that worked for me…. But I am pretty shure that there is easier and bbpress / php more friendly way how to do this ….If you have any idea just let me know, for the moment I am going to use content-single-topic-lead.php code. I really appreciate your help.

    I am going to finish my page within few days, I learned a lot during the process, so I think that I can help other people on this support forum like you do…

    Thank you Robkk


    ynteligent
    Participant

    @ynteligent

    That php / bbpress more friendly solution I meant something like:
    <?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?> …. related somehow to $topic_id…. but I am really not abble to figure out how to do it this way….Maybe you have some idea…

    Peter

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