- This topic has 3 replies, 2 voices, and was last updated 7 years, 3 months ago by Mahesh.
-
AuthorPosts
-
December 27, 2016 at 8:26 pm #105949barbyma31Participant
Hi
How should I add rel = dofollow to pagination in single.php so that google crawls the rest of the pages?
RegardsDecember 28, 2016 at 9:58 am #105974MaheshKeymaster@barbyma31: You’ll need to create a child theme for this. You can find more about creating child theme HERE. Then in your child theme copy content-single.php file from the Catch Flames folder. And edit the pagination part as required.
<div class="entry-content"> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span class="pages">' . __( 'Pages:', 'catch-flames' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', ) ); ?> </div><!-- .entry-content -->
This is the pagination part.
Note: Let the other codes untouched.Regards,
MaheshJanuary 28, 2017 at 10:53 pm #108222barbyma31ParticipantHi, Mahesh
I’m sorry but I want to say that when in WordPress I have published 30 entries and in the Reading Settings I point out the Maximum Number of Entries to Display on site 10, the google crawler doesn’t continue to the following pages. This happens because the pagination links (Old Articles and New Articles) are “nofollow” and must be “dofollow”.In the single.php file I modified these lines but it didn’t work for me. Can you tell me how to do it, please?
<span class=”nav-previous”><?php previous_post_link( ‘%link’, __( ‘<span class=”meta-nav”>←</span> Previous’, ‘catch-flames’ ) ); ?></span>
<span class=”nav-next”><?php next_post_link( ‘%link’, __( ‘Next <span class=”meta-nav”>→</span>’, ‘catch-flames’ ) ); ?></span>In html it would be like this:
Artículos antiguosRegards,
Bárbara.January 29, 2017 at 12:15 pm #108253MaheshKeymaster@barbyma31: I don’t quite understand. Can you please clarify more.
Regards,
Mahesh -
AuthorPosts
- The topic ‘Add rel = dofollow’ is closed to new replies.