Better Search
[resolved] Custom template page repeats page title over and over (5 posts)

  1. chrisrahe
    Posted 3 years ago #

    I love the results this plugin produces, but the results page wasn't fitting into my custom template so I followed the instructions on your website for downloading and modifying the better-search-template.php file. It was pretty simple, but I discovered that the page title display repeats horizontally and I can't figure out why. There's nothing in the template or CSS that would cause this. Is there something in the plugin itself?

    See our site http://www.mennoniteusa.org and enter any search to see the results page. I may have to remove the title display from this template page altogether. (I've tried just entering static <h1> content there instead of PHP and it still repeats).

    Here is what I've got in the PHP template file (through the Header section):

    Template Name: better-search-template
    <?php get_header(); ?>
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div id="title">
    </div><!-- End Header -->

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]


  2. Ajay
    Plugin Author

    Posted 3 years ago #

    You don't need the:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

  3. chrisrahe
    Posted 3 years ago #

    Thanks, but when I remove that line I get a syntax error (500 Error code).

  4. chrisrahe
    Posted 3 years ago #

    Oops. I removed the endif later on in the code and don't get the error anymore.

    That seems to fix the problem.


  5. Ajay
    Plugin Author

    Posted 3 years ago #

    Sounds great :)

    Thanks for using the plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Better Search
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic