Title: Meta Description and MultiPaged Posts
Last modified: August 20, 2016

---

# Meta Description and MultiPaged Posts

 *  Resolved [Tzeapa](https://wordpress.org/support/users/tzeapa/)
 * (@tzeapa)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/meta-description-and-multipaged-posts/)
 * Hello,
 * I’m certain I’m not alone. I currently use AIOSP and disable it for paged posts.
   And the descriptions showing for those posts in the SERPS are messed up. If I
   enable All in One SEO Pack for paged posts then I get duplicate meta descriptions…
   so it’s a lose lose situation.
 * I’m only using multiple pages for posts because I use a lot of pictures and write
   a lot in my articles so I need to split them.
 * I managed to modify the title to show a – Page X so I avoid duplicate titles 
   but for description I really need to use different ones for each page of the 
   post.
 * Is there any way to do so? Plugins? Code Snippets? Anything would help a lot.
 * Thank you very much !

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Tzeapa](https://wordpress.org/support/users/tzeapa/)
 * (@tzeapa)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/meta-description-and-multipaged-posts/#post-2297449)
 * I finally cracked it, got it working perfectly. If someone wants to know how 
   I did it please leave a reply and I will tell you the solution. I won’t write
   it now because although it’s a very simple solution I don’t have the time to 
   write all the instructions…
 *  [ptpgen](https://wordpress.org/support/users/ptpgen/)
 * (@ptpgen)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/meta-description-and-multipaged-posts/#post-2297577)
 * Hey Tzeapa:
    I’d love to know how you did that as i’m looking for the same answer.
   🙂 Thanks!
 *  Thread Starter [Tzeapa](https://wordpress.org/support/users/tzeapa/)
 * (@tzeapa)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/meta-description-and-multipaged-posts/#post-2297578)
 * So here it goes I’ll try to be as explicit as possible so bare with me 🙂
 * The solution is using custom fields and then calling them in your theme’s header.
   php file…
 * Here is what I did, I have a lot of posts with 2 and 3 pages and the maximum 
   nr of pages on a post is 4.
 * On each post with more then 1 page you have to add a number of custom fields.
   On posts with 2 pages you must add 2 custom fields, on posts with 3 pages you
   need 3 custom fields and so on…
 * So on each paged post I added the following custom fields (you can use whatever
   names you want): metadesc1 (meta description for page 1 of the post) metadesc2(
   meta description for the 2nd page of the post), metadesc3 and metadesc4.
 * Each custom field must contain the following:
 * <meta name=”description” content=”your meta description for the page” />
 * So it’s something like this:
 * **metadesc1** custom field = <meta name=”description” content=”meta description
   for **1st page**” />
 * **metadesc2** custom field = <meta name=”description” content=”meta description
   for **2nd page**” />
 * etc etc
 * After adding those custom fields to each of the multi page posts you have to 
   add them to your HTML. You do this by calling those custom fields in your theme’s
   header.php file using **get_post_meta** function. So add in the header.php file(
   before </head> ) the following:
 * `<?php if ( ($page < 2) && is_single()) { echo get_post_meta($post->ID, 'metadesc',
   true); } ?>`
 * this adds the meta description on every 1st page of a post
 * `<?php if ( ($page > 1) && ($page < 3) && is_single() ) { echo get_post_meta(
   $post->ID, 'metadesc2', true); } ?>`
 * this adds the meta description on every 2nd page of a post
 * `<?php if ( ($page > 2) && ($page < 4) && is_single() ) { echo get_post_meta(
   $post->ID, 'metadesc3', true); } ?>`
 * this adds the meta description on every 3rd page of a post
 * `<?php if ( ($page > 3) && ($page < 5) && is_single() ) { echo get_post_meta(
   $post->ID, 'metadesc4', true); } ?>`
 * this adds the meta description on every 4th page of a post.
 * Although it is a lot of work depending on the number of paged posts, the concept
   is very easy, if you have any issues or you don’t understand something I will
   help you as this fix was a god send for my website, every user that uses the 
   <–nexpage–> tag should implement this.
 * Just hours after I did this Google started indexing 2nd, 3rd etc pages of my 
   articles and they appeared in the search results.
 * To further improve SEO, you must disable the wordpress canonical url function
   which will stop google from indexing your paged pages.
 * To do that simply add the following line in your theme’s funtions.php
 * `remove_action('wp_head', 'rel_canonical');`
 * **Edit:** Maybe a plugin developer will see this and implement all this stuff
   into a plugin, as I said before the implementation is very easy but there is 
   almost no useful information on how to add custom meta description on paged posts
   so I may be the first to do this…
 * Also using this method you can add keywords or any kind of meta info…
 * What I forgot to mention is that I use All in One SEO Pack but I disabled if 
   for posts with more than 1 page…

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Meta Description and MultiPaged Posts’ is closed to new replies.

## Tags

 * [description](https://wordpress.org/support/topic-tag/description/)
 * [page](https://wordpress.org/support/topic-tag/page/)
 * [paged](https://wordpress.org/support/topic-tag/paged/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Tzeapa](https://wordpress.org/support/users/tzeapa/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/meta-description-and-multipaged-posts/#post-2297578)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
