Support » Themes and Templates » Remove Links from Post Titles

  • Resolved johnnycho


    Can anyone tell me how to remove the link from a post title so that only the title shows up? I don’t want to do this for ALL post titles — just the ones in a particular category that show up on a particular page. I’ve created a custom page template in a child theme. Is there some way to do a conditional statement in my custom page template that modifies the output of the_content() to strip out the link tags? Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator t-p


    In your theme’s php files there should be a reference to these permalinks, looking like this:

    <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a>

    Remove the anchor links and replace it with:

    <?php the_title(); ?>

    Thanks t-p! It helps to base one’s custom solution on the correct template!

    Still new to WP. So much to learn…!

    Moderator t-p


    you are welcome.:-)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove Links from Post Titles’ is closed to new replies.