WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: SEO Super Comments] Extending the Code (2 posts)

  1. SEO Dave
    Member
    Posted 4 years ago #

    I've been playing around with a plugin called SEO Super Comments http://www.prelovac.com/vladimir/wordpress-plugins/seo-super-comments which creaes a page for each comment.

    Got it working at http://www.45-year-old-millionaire.co.uk/what-is-twitter-marketing.html#comments (though had to hack my themes code to get it working as I wanted it).

    Example comment page http://www.45-year-old-millionaire.co.uk/what-is-twitter-marketing.html?cid=4848

    Cool concept for an SEO plugin, but it's not perfect.

    What I want to do now is only show the link code when a comment is X number of words or charachters, so a long comment gets it's own page (created by the plugin) while small comments don't get the link. Right now a single word comment gets it's own page which is bad SEO wise.

    So I'm trying to figure out the code for this and not sure where to start. Is there a variable or something that counts the number of words in a comment for example? If there is I could use it as part of a if statement.

    David

  2. Pinoy.ca
    Member
    Posted 4 years ago #

    Well, if comment # 4848 is only one word, what DO you want to appear at http://www.45-year-old-millionaire.co.uk/what-is-twitter-marketing.html?cid=4848 ?

    To answer your question: Picking which comment becomes a clickable "cid" link or not can be done inside SEOSuperComments_author_link(). For example, add

    if (strlen($comment->comment_content) <= 5) return $link;

    after the global $comment;.

Topic Closed

This topic has been closed to new replies.

About this Topic