Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display Topics Only On Search Results


  • rogerlridge
    Participant

    @rogerlridge

    Hello, I am looking for a way to have the search function the way it does normally by searching for particular keywords through the forum, topics and replies but I would like to display the results in topic format only. For example a list of topics in which the keywords entered are located. What files do I need to edit to achieve this and how would I go about doing this please? Any help would be greatly appreciated!

    Screenshot of issue

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

  • Robin W
    Moderator

    @robin-w

    4 files of interest to you

    all found in templates/default/bbpress

    loop-search.php
    loop-search-topic.php
    loop-search-reply.php
    loop-search-forum.php

    copy them to your theme

    so if you wanted to amend loop-search-topic you would do the following

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-search-topic.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-search-topic.php
    bbPress will now use this template instead of the original
    and you can amend this


    rogerlridge
    Participant

    @rogerlridge

    Thank you for your reply, the problem however is that when something is searched on bbpress it searches topics, forums and replies but the forum displays different information as does the replies which if i set the loop-search-topic as the template for everything, it’s displayed all messed up when the search results are forums and replies and not topics, the topics are displayed normally but the other stuff is a mess. How would I get it to display the forum and reply results in the same manner as the topic results? Because that’s where my problem actually is. Thank you once again.


    Robin W
    Moderator

    @robin-w

    then you’d alter loop-search-reply.php to look like how you want it


    rogerlridge
    Participant

    @rogerlridge

    but I don’t know how to edit it to look like the loop-topic, I don’t know what information to remove and what information to add, I’m a newbie developer you see lol so i need all the help i can get please.

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