How to remove permalink on page titles?

  • bradley1


    I’m in the process of designing my first website, and I’ve chosen to use the Graphene theme. However, I notice that the titles of all my pages are “clickable” (i.e., they are all links that can be selected), and I want to disable this. For example, the menu bar can have a category that you click on, and that takes you to the corresponding page. But on that page, the title can also be clicked on. And it doesn’t take you anywhere because, obviously, it leads to the same page that you’re on. You can have a look at my website (still a work-in-progress):

    If you click on “Sample Category” in the menu bar for example, it takes you to a page with the title “Sample Category”. This title can also be clicked on. And clicking on it doesn’t take you anywhere else, of course. So how can I turn these title-links off?



    Well, it’s located in your loop.php file… however I’m not sure of the best practice of removing this??

    You can go into your loop.php file and comment out the code manually, but you will lose it when you update graphene.

    I’ll work on another method, but in the meantime (if you feel comfortable) open up your loop.php file and find this chunk of code:

    <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(esc_attr__('Permalink to %s', 'graphene'), the_title_attribute('echo=0')); ?>"><?php if (get_the_title() == '') {_e('(No title)','graphene');} else {the_title();} ?></a>

    And replace it with this:

    <?php if (get_the_title() == '') {_e('(No title)','graphene');} else {the_title();} ?>

    Syahir Hakim


    That permalink has been removed in the current dev version, and will be reflected in the next version 1.6.



    Well now… there you go ๐Ÿ™‚



    Thank you for your help guys.

    Josh, I tried your suggestion just now and it worked just fine – no unintended side-effects that I’ve noticed.

    One more thing, if you don’t mind. I just realized that the title in the header (which currently says “My Website” on my webpage) is also a link. Anyway to disable that as well?


    Kenneth John Odle


    Try Graphene Options >> Display >> Header Display Options and tick the box marked “Link header image to front page”.

    You can change the name in General Settings >> Site Title

    but you can control what appears in the title bar of each window by going to

    Graphene Options >> Display >> Miscellaneous Display Options



    Kenneth, thanks for your reply. I actually want to disable linking the header title (as well as the “header image” – not sure if this means the same as “title”) to the front page. So I left the box marked “Link header image to front page” unchecked. However, it does not seem to have any effect on the title in the header – clicking on the title still links to the front page.



    Again, I don’t know best practices for this one. But I know how to edit the core files. So, if you use this, you must remember to do it again everytime a new version of graphene is released. You have been warned ๐Ÿ˜‰

    In your header.php file.. find this chunk of code:

    <?php echo '<'.$title_tag; ?> <?php echo $style; ?> class="header_title"><a <?php echo $style; ?> href="<?php echo home_url(); ?>" title="<?php esc_attr_e('Go back to the front page', 'graphene'); ?>"><?php bloginfo('name'); ?></a></<?php echo $title_tag; ?>>

    And replace it with this:

    <?php echo '<'.$title_tag; ?> <?php echo $style; ?> class="header_title"><a <?php echo $style; ?> title="<?php esc_attr_e('Go back to the front page', 'graphene'); ?>"><?php bloginfo('name'); ?></a></<?php echo $title_tag; ?>>

    Be sure to back up your header.php file first. In case the above code has an error, we can easily restore the original.



    Thanks a lot, Josh. That worked.

Viewing 9 posts - 1 through 9 (of 9 total)

  • You must be logged in to reply to this topic.
Graphene Themes Forum