Custom Comments Intro Filter for Thesis

Custom Comments Intro Filter

function custom_comments_intro_filter($output) {
  return str_replace('&#8230; read it below or <a href="#respond" rel="nofollow">add one</a>', ' &mdash; <a href="#respond" rel="nofollow">Add your comment</a>',$output);
}
add_filter('thesis_comments_intro', 'custom_comments_intro_filter');

Comments

  1. Melanie says:

    I am having a hard time getting this to work.
    My client would like the default:
    {1 comment… read it below or add one}
    changed to:
    {1 comment… What do you think? Was this post a hit, or a fail?}

    I tried editing your code to:

    function custom_comments_intro_filter($output) {
    return str_replace(‘… read it below or <a href=”#respond” rel=”nofollow”>add one</a>’, ‘ — <a href=”#respond” rel=”nofollow”>What do you think? Was this post a hit, or a fail?</a>’,$output);
    }
    add_filter(‘thesis_comments_intro’, ‘custom_comments_intro_filter’);

    But it’s no affecting the output at all.

    Any ideas?

    • Gary says:

      Melanie,

      This post was written when Thesis 1.6 was the latest version. I expect something changed in versions 1.7 or 1.8, so that the replacement pattern doesn’t match.
      There may even be a new filter that allows a smarter way of changing the content.

      Your best bet would be to ask on the Thesis boards, as they’ll have a far better understanding of the latest Thesis code.

Speak Your Mind

*