Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #105949
    barbyma31
    Participant

    Hi
    How should I add rel = dofollow to pagination in single.php so that google crawls the rest of the pages?
    Regards

    #105974
    Mahesh
    Participant

    @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,
    Mahesh

    #108222
    barbyma31
    Participant

    Hi, 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 antiguos

    Regards,
    Bárbara.

    #108253
    Mahesh
    Participant

    @barbyma31: I don’t quite understand. Can you please clarify more.

    Regards,
    Mahesh

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Add rel = dofollow’ is closed to new replies.