Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support ying

    (@yingscarlett)

    Hi @youtechians ,

    We can try to add rel="nofollow" to the pagination links.

    • Add an additional CSS class to the Container block which contains the previous/next/page numbers, eg. no-follow-pagination
    • Add this PHP code, it looks for the a element and adds nofollow. Let me know if this works ??
    add_filter( 'render_block', function( $block_content, $block ) {
        if (  ! empty( $block['attrs']['className'] ) && 'no-follow-pagination' ===  $block['attrs']['className'] )  {
    		
    $block_content = str_replace('<a', '<a rel="nofollow" ', $block_content);
        }
    
        return $block_content;
    }, 10, 2 );
    
    • This reply was modified 1 year, 7 months ago by ying.
    Plugin Support fernandoazarcon2

    (@fernandoazarcon2)

    Hi there! We haven’t heard back from you for a while now so we’re going to go ahead and set this topic as resolved. Feel free to reply if you need any more help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Query loop url getting indexed by google’ is closed to new replies.