Auto excerpt

Home Forums Shard – WordPress Theme Auto excerpt

This topic contains 22 replies, has 2 voices, and was last updated by  ab-themes 8 years ago.

Viewing 3 posts - 21 through 23 (of 23 total)
  • Author
    Posts
  • #15991

    ab-themes
    Keymaster

    Hi,

    please open your search.php file
    (you can find it here \shard\wp-content\themes\shard\search.php)

    In that file on line 38 you have this code:

    <?php get_template_part( 'partials/pagination-search' ); ?>

    Put that code up to line 29 so your div with span9 code will look like this:

    <div class="span9 content_with_right_sidebar">
    <h2 id="search_results_sum_title"><?php _e('Showing Results for: ', 'ABdev_shard');?> <?php the_search_query(); ?> (<?php echo $wp_query->found_posts; ?>)</h2>
    <?php if (have_posts()) :
    $i = (((get_query_var('paged')) ? get_query_var('paged') : 1) - 1 ) * get_option('posts_per_page');
    	while (have_posts()) : the_post();
    		$i++; ?>
    <div class="search_results_content_item">
    <h4><a href="<?php the_permalink(); ?>"><?php ABdev_shard_search_title_highlight(); ?></a></h4>
    <span class="search_resuls_number"><?php echo $i; ?>.</span>
    	<p><?php ABdev_shard_search_content_highlight(); ?></p>
    </div>
    <?php endwhile; ?>
    <?php else: ?>
    	<?php _e('Sorry, your search query yielded no results.', 'ABdev_shard'); ?>
    <?php endif;?>
    <?php get_template_part( 'partials/pagination-search' ); ?>
    </div>

    As you can see that code with pagination is now before div is closed.

    In you style.css file you need to add this code:

    #blog_pagination .container {
        width: 100%;
        margin: 0;
    }

    Cheers

    #16001

    MichaelK
    Participant

    Hey,

    this works fantastic. :)

    Thanks so much.

    Wish you a nice day

    Cheers

    Michael

    #16010

    ab-themes
    Keymaster

    No problem :)

    Cheers

Viewing 3 posts - 21 through 23 (of 23 total)

The topic ‘Auto excerpt’ is closed to new replies.