The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Remove Links from Post Titles (4 posts)

  1. johnnycho
    Posted 4 years ago #

    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.

  2. Tara
    Volunteer Moderator
    Posted 4 years ago #

    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(); ?>

  3. johnnycho
    Posted 4 years ago #

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

    Still new to WP. So much to learn...!

  4. Tara
    Volunteer Moderator
    Posted 4 years ago #

    you are welcome.:-)

Topic Closed

This topic has been closed to new replies.

About this Topic