WordPress.org

Ready to get started?Download WordPress

Forums

How to remove article title link (2 posts)

  1. Waterhead
    Member
    Posted 1 year ago #

    I dont know if this is the right 2category" to ask but how to remove that link from article titles, i want it to be just text no link.

  2. bcworkz
    Member
    Posted 1 year ago #

    Depends on how your theme displays titles. For example, in the twentyeleven theme, the title itself is generated by content.php template for the main index page with the code <?php the_title(); ?> . You will see that code is surrounded by html <a> tags which make the title a link. So if you remove all the <a> tag html except for the <?php the_title(); ?> code itself, you effectively delink the title.

    Hopefully your theme handles this very similarly so it won't be too hard to find. If you don't want to lose this customization the next time your theme is updated, consider making a small child theme. It need not contain more than a .css file containing only a particular comment any your modified template file.

Topic Closed

This topic has been closed to new replies.

About this Topic