Support » Fixing WordPress » Remove hyperlink from post title won't work.

  • Resolved jmadz1


    I have these lines in my single.php document.

    <div class="post">
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>

    I tried removing the <a> tags and the permalink section so it looked like this:

    <h2><?php the_title(); ?></h2>

    but my page still shows it as a hyperlink. How can this be? Yes I have saved the changes and I’ve tried multiple times with slightly different variations of <h2><?php the_title(); ?></h2> but to no avail.

    Does anyone know if there is something overriding the changes I’m making, or if I’m just doing it wrong? Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    If you don’t want the link, <h2><?php the_title(); ?></h2> is correct. Did you empty your cache?

    Also, check your theme to make sure that’s the page it’s calling for your single post.

    I went through all of my php files and 5 of them had the code title code with the permalink and <a> tags included.


    I changed the code in each one to and then saved changes, then cleared my cache. I went back on my website and there is still a hyperlink for the post title.

    Very anoying how things aren’t as straight forward as everyone makes out. I’ve searched the internet for answers but everyone gives the same advice ‘just change it to <h2><?php the_title(); ?></h2>‘, that’s all you have to do.

    Do you know anything else that might be affecting this?

    Moderator kmessinger



    I’ve noticed that now it’s actually worked on all my pages except for “Which Pull Up Bar?” which still remains a hyperlink, even though I’ve cleared my cache.

    Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    FYI, you need to put CODE tags around <a> on the forums to stop goobering your posts 😉

    “Which Pull Up Bar?” – has no title link for me.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove hyperlink from post title won't work.’ is closed to new replies.