Support » Fixing WordPress » Can I disable post titles’ clickable URL’s, but keep permalinks?

  • The post titles at my blogs (Angies List podcast and TFS are clickable, but I don’t want them to be. Do you know how to disable clickable post titles in WordPress/K2? My PHP knowledge is limited, so I don’t want to go mucking around without knowing for sure how to disable these.

    I would, however, like to keep the permalinks; just not have the titles for the posts be clickable to the permalinks. E.g. if you’re at 1, and you click on the title, it would go to the same page, 1. I just want to disable clickable titles without ruining permalink URL’s. Hope I’ve made sense 😛 Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Here’s what I did:

    I found the anchor tag that makes the post title a hyperlink.

    Then I inserted some conditional code to tell the page not to show the title as a link if it has anything to do with category “frontpage”. (Notice the “if” and “endif” statements.)

    This, effectively, turns off the title link on my front page, leaving the titles and permalinks on my other pages/posts alone.

        <? if (single_cat_title("", false)!="frontpage"):?>
           <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
        <? endif;?>
          <?php the_title(); ?>
        <? if (single_cat_title("", false)!="frontpage"):?>
        <? endif;?>

    You can see it in effect on http:/

    Why not just:

    <h2><?php if( is_single() ) : ?>
    <?php the_title(); ?>
    <?php else : ?>
    <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
    <?php endif; ?></h2>


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can I disable post titles’ clickable URL’s, but keep permalinks?’ is closed to new replies.