The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Search pagination not working (2 posts)

  1. welcomebrand
    Posted 4 years ago #

    I've recently updated my permalinks to use the postname but I've just found that if I search on my site when I click for older posts I just get a blank page. No ideas why so wondering if anyone else might be able to point me in the direction of a fix?

    You can view a search here http://www.welcomebrand.co.uk/?s=web and if you click on "older posts" it's just an empty page. (Normal blog article pagination works fine)

    My search.php code is:

    <?php get_header(); ?>
    	<?php if ( have_posts() ) : ?>
                <?php get_template_part( 'loop', 'search' ); ?>
                <?php else : ?>
                <article class="primary-content">
                    <h1>Search results: <span><?php _e( 'Nothing Found' ); ?></span></h1>
                    <figure class="alignleft">
                    	<img src="<?php echo bloginfo('template_directory'); ?>/assets/images/nothing-found.jpg" alt="Sorry, nothing quite matches your search" />
                    <p>I'm very sorry but I couldn't find anything to match your search for "<mark><?php printf( __( '%s' ), '<span>' . get_search_query() . '</span>' ); ?></mark>".</p>
                    <p>If it's something specific you're looking for, please feel free to keep bashing out the keywords but if you still can't find it - <a href="mailto:james@welcomebrand.co.uk">send me an email</a> or if it's design related, perhaps it's something I could write about so don't be afraid to suggest topics!</p>
                <?php endif; ?>
    <?php get_footer(); ?>

    If that's of any help?

    Any ideas on a fix appreciated.

  2. welcomebrand
    Posted 4 years ago #

    Installed this plugin http://wordpress.org/extend/plugins/search-permalink and it *fixes* the problem but I'd like to try and get to the bottom of it if possible without a plugin.

Topic Closed

This topic has been closed to new replies.

About this Topic