• Hello! I am using the “!–nextpage” code to break up a post into 3 parts. However, it is showing [pages: link1 link2 link3]. How/Where can I change it to look more like [ (? Prev 1 … 3 4 5 6 7 … 9 Next ? ] or even [pages: 1 2 3]

Viewing 3 replies - 1 through 3 (of 3 total)
  • that is controlled by your theme. Please visit the theme’s support page for help customizing a theme

    Hello,

    Try the below code. I think its working.

    <?php
    	$args = array(  
    		'post_type' => 'post',
    		's' => $searchinput,
    		'posts_per_page'         => '3',
    		'paged'                  => $paged
    	);
    	query_posts( $args );
    	$posts= get_posts( $args );
    	if ($posts) {
    	    foreach ( $posts as $post ) {
    	        setup_postdata($post);
    	        ?>
    	        <div class="chinaseredivs">
    		        <a>	 
    		        	<?php 
    		        		if(get_the_post_thumbnail( $post->ID, 'thumbnail' )){
    		        			echo get_the_post_thumbnail( $post->ID, 'thumbnail' );
    		        		} 
    		        		else{
    		        			echo '<img src="https://via.placeholder.com/350x150" />';
    		        		}
    		        	?>
    		       		<h3 class="chinasearchrepost"><?php the_title(); ?></h3>
    		        	<?php
    		        		$content=get_the_content();
    		        	?>
    		        	<p class="chinasearchrepost"><?php echo wp_trim_words($content, 40,'...'); ?></p>
    	        	</a>
    	        </div>
    			<?php
    	    }
    	    the_posts_pagination( array(
    	    	'mid_size'=>3,
    		 	'prev_text' => _( 'Back'),
    		  	'next_text' => _( 'Next'),
    		) );
    	}
    ?>

    [ Signature moderated ]

    The above code snippet is not for pagination

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pagination Display Text’ is closed to new replies.