WordPress.org

Ready to get started?Download WordPress

Forums

remove links in post titles (5 posts)

  1. vieux
    Member
    Posted 4 years ago #

    i don't want ANY of the post titles on my blog to have links. how can i accomplish this? please be specific, i'm fairly new to wordpress but good at following instructions and editing files.

    TIA!

  2. MichaelH
    Member
    Posted 4 years ago #

    Okay an example...using the WordPress Default theme, edit wp-content/themes/default/index.php and change this:

    from:

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

    to:

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

    Since you are new to WordPress you might want to review these:
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

  3. Arnold Goodway
    Member
    Posted 4 years ago #

    I am not quite sure what you have in mind here. Post titles appear all over your blog. If you remove the links on the titles on the main page (index.php) your readers will have no way of getting to your singles page to leave a comment. Most WordPress themes do not have links on the post titles on the single pages (single.php).

    You will also find post titles on the following files:

    • archive.php;
    • author.php;
    • search.php;
    • 404.php and
    • on other files that might be included in your theme.

    If you remove the links on these post titles you will be defeating the object of these pages. You will not be able to navigate from these pages to the actual articles themselves.

    If you want to remove the links all you need do is to remove the links on the relevant files where the post titles are added.

  4. vieux
    Member
    Posted 4 years ago #

    hi, thanks for your responses. the main page posts are short and concise so when a reader clicks on the link it goes to the another page with the same exact info - very annoying to a reader for sure. MichealH, i'm working with the thesis theme and the index.php for that theme is pretty much empty and doesn't have any of the code listed above.

    i've inquired about this at the thesis forum but no one there seems to have a clue. any other ideas??

    TIA

  5. vieux
    Member
    Posted 4 years ago #

    anyone?

    thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic