• Hello everyone,

    I name all my post titles like this: “Read – followed by the post name”. I just like the way it looks. But the problem is I have a similar posts plugin that lists the names of similar posts to the one being read. Of course this includes the “Read” prefix to every post name.

    Is there any way I can keep the “Read” at the start of every post title but prevent it from showing up in the similar posts list. Perhaps using some sort of php code to exclude this particular word?

Viewing 1 replies (of 1 total)
  • I’d think it is better to ADD “Read -” in the places that you want that to show rather than typing than in for each post title. For instance, in the WordPress Default theme's wp-content/themes/default/index.php file, you would change this line:
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

    to this:
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">Read - <?php the_title(); ?></a></h2>

    If that doesn’t work for you, then you will need to provide a link to the similar posts plugin you are using and maybe someone can look at how that plugin would need to be modified to do that.

Viewing 1 replies (of 1 total)
  • The topic ‘Preventing part of the post title from showing in the similar posts list’ is closed to new replies.