WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. chrisrahe
    Member
    Posted 1 year 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):

    <?php
    /*
    Template Name: better-search-template
    */
    ?>
    <?php get_header(); ?>
    
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div id="title">
       	    <h1>Search</h1>
            </div>
    </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.]

    http://wordpress.org/extend/plugins/better-search/

  2. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    You don't need the:

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

  3. chrisrahe
    Member
    Posted 1 year ago #

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

  4. chrisrahe
    Member
    Posted 1 year ago #

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

    That seems to fix the problem.

    Thanks!

  5. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    Sounds great :)

    Thanks for using the plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic