How to list posts TITLES ONLY from a specific category (2 posts)

  1. bradleysue
    Posted 3 years ago #

    I'm trying to list my 5 most recent posts from a specific category - TITLES ONLY (i.e. without a link to the post).

    Does anyone know how to do this, ideally with a plugin.

    I already use Recent Posts and List Category Posts but can't figure out how to do what I need with either of these plugins.

    thanks for any help you can provide.

  2. threestyler
    Posted 3 years ago #

    Open the index.php or the related file/location you want this modification to be on and look for:

    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>

    Replace with:

    <?php the_title(); ?>

    That will remove the links from the titles. You could limit posts to 5 via the WordPress admin > Settings > Reading

Topic Closed

This topic has been closed to new replies.

About this Topic