1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wordpress more tags help

Discussion in 'Black Hat SEO' started by rugbyjack2005, Jul 4, 2012.

  1. rugbyjack2005

    rugbyjack2005 Power Member

    Joined:
    Oct 2, 2011
    Messages:
    539
    Likes Received:
    50
    Location:
    United Kingdom
    Hi,

    On one of my WordPress blogs, i have a homepage with short snippets of all my blog posts with the most recent at the top (pretty standard). I get these snippets by adding the <!--more--> tag in the blog post where i want the snippet to end. If i do not put this tag in, the whole post shows on the homepage. I didn't notice until now but if you click on the "read the rest of this entry" on any of the snippets on the homepage, the URL it gives you is http://www.domain.com/blog-post#more-218 (218 is the blog post number). This is obviously different to the blog post URL which is http://www.domain.com/blog-post. This isn't great as it is in effect automatically duplicating my content. Obviously i can add canonical tags but i would like to fix the fault.

    Any ideas how i do this?
     
  2. rugbyjack2005

    rugbyjack2005 Power Member

    Joined:
    Oct 2, 2011
    Messages:
    539
    Likes Received:
    50
    Location:
    United Kingdom
    I've fixed it now. For those of you that are interested, to remove the #more in WordPress listing when you click "read more about this entry", enter the following code in the functions.php file


    function remove_more_jump_link($link) { $offset = strpos($link, '#more-'); if ($offset) { $end = strpos($link, '"',$offset); } if ($end) { $link = substr_replace($link, '', $offset, $end-$offset); } return $link;}add_filter('the_content_more_link', 'remove_more_jump_link');