Support » Plugin: Better Search » Customising search results

  • First of all, I must say that Better Search is easily the best search plug in I have tried (and I tried quite a few) – thanks Ajay!

    I am a complete newbie to php/Wordpress, so please forgive any stupid questions that may follow…

    Hoping someone can help with a small issue I have:

    I am using a premium theme, and have copied over the better-search-template.php to the theme directory. When I run a search, two things happen I want to stop:
    1. The right sidebar disappears completely (the search takes up the whole area between the header and the footer)
    2. Both the header and the footer distort making them double the height

    What code can I enter/change in the better-search-template.php so it only displays the results in the format of the installed theme, e.g; displays search results in the body of the page without a distorted header and footer, and with the sidebar present?

    Please could you keep any answers as simple as possible as the extent of my php knowledge is copy and paste!

    Many thanks for any help in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Look at your theme’s search.php page and compare it to better-search-template.php. If you cannot figure it out from there, get a programmer to do it for you. If you don’t know anyone, look on or Elance.

    I am in the process of creating a page for the Canvas theme by Woo and I will share it with Ajay if I can make it general enough.

    I just thought of a simpler solution.
    If you enable Seamless Integration (it’s an option in the Better Search plugin settings), the results will be displayed on the theme’s standard search results page.
    There are only two drawbacks to this approach:
    – If you want to display a heatmap, you’ll have to modify your theme’s search page and add the necessary template tags.
    – Relevance percentages are not displayed (I hope Ajay will provide a solution for that in a future release).

    Hi Franciscus,

    Many thanks for all of your advice.

    Your post 1:
    I did have a look at both files as you suggested,and tried a few things, but I’m afraid my php skills are non existent – so nothing worked. Would any required changes just be to the template results page, or would other associated files also likely need amending?

    Your post 2: When I activate seamless integration, it just refers back to the search result format for the theme.

    Thanks again!

    Plugin Author Ajay


    @franciscus, Sounds good regarding the new search template. If you do get it to work well, do let me know.

    @donhinio, I’m afraid with premium themes, it is impossible for me to suggest any changes.
    Your best bet is to check with the theme developers and show them the better-search-template.php file and ask them what needs to be modified to get it to fit their theme.

    The seamless integration mode is usually the easiest option to make it integrate perfectly in your theme without editting any files.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Customising search results’ is closed to new replies.