• Resolved sylvianNYC

    (@sylviannyc)


    I searched hard but I can’t find or put together an answer for this.

    We have free images for download and each category index page shows a compact grid of about 30 images. We use pagination to go to different pages of the category. For SEO purposes, we want to have different text on each of these pages. We use custom templates all over the place (category-11.php), there’s lots of php include going on and I figured that’s what I would do here. But, the question is: how can I identify a specific page of the pagination (2, 3, 4…) and include a different text file in it?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    echo $paged;
    Thread Starter sylvianNYC

    (@sylviannyc)

    Thanks, Michael. That was the missing ingredient and it totally works!

    Maybe now it will be easier to find.
    I’ll post all of my code when I plug it in.

    Thread Starter sylvianNYC

    (@sylviannyc)

    I haven’t yet implemented the code above for the purpose of changing the text on the page but I did use it for something else. When I looked at our report in the Google Webmaster Tools, I noticed that Google was correctly registering duplicate title tags on the category pages that had pagination. So I did this:

    <?php if (is_category() ) {
    	echo 'Category Name';
    	if (get_query_var('paged')) {
    		echo ' - Page ' . get_query_var('paged');
    		}
    	}
    elseif (is_single() ) {
    	echo 'Category Name | ';
    	single_post_title();
    	}
    ?>

    Hope this helps someone.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Specific pages in pagination’ is closed to new replies.