Forums

Show Category in Recent Posts (3 posts)

  1. adam_g2000
    Member
    Posted 2 years ago #

    I've been looking for a plugin that will extend the basic Recent Posts (or replace it) Widget. What I want to achieve is for it to show not only the title of the Post, but the category before it. I've found this (which is nice) http://www.category-icons.com/ but I'd rather have text than possibly confusing icons. So where it may have looked like this:

    Latest Posts
    Star Wars
    Bugatti Veyron
    Coffee

    I'd like it to look like this:

    Latest Posts
    Movies: Star Wars
    Cars: Bugatti Veyron
    Beverages: Coffee

    If anyone has come across something like this I'd be vastly grateful, my searches haven't turned up anything.

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    This thread has an example of putting the category before the title:
    http://wordpress.org/support/topic/314298?replies=6

    <p> <?php the_category(', '); ?> -
          <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
  3. adam_g2000
    Member
    Posted 2 years ago #

    Worked brilliantly, thanks. Problem solved.

Topic Closed

This topic has been closed to new replies.

About this Topic