WordPress.org

Forums

Yet Another Related Posts Plugin (YARPP)
[resolved] Items' categories (6 posts)

  1. rhiannonmorris
    Member
    Posted 1 year ago #

    Hi,
    Is it pssible to add the name of the category to the end of the item link. I have a large number of items, many of which require their category, in order to make sense.

    Is this possible? I have searched the settings and could see nothing but maybe there's something I've missed or something I can add to the PHP files?
    Thanks in advance.
    Rhiannon

    http://wordpress.org/plugins/yet-another-related-posts-plugin/

  2. jeffparker
    Member
    Plugin Author

    Posted 1 year ago #

    You'll have to add custom PHP code and call the category(ies) for each item. See the "custom template" section of the FAQ, as well as http://codex.wordpress.org/Function_Reference/get_the_category for details.

  3. rhiannonmorris
    Member
    Posted 1 year ago #

    Thanks Jeff.
    I have managed to call the category name for each post, but the category name is displaying on the next lin with an additional bulleted indent. Any ideas what I've done wrong.

    My code is:

    ...

  4. " rel="bookmark" ?> <?php the_title(); ?> - <?php the_category() ?>
  5. ...

  • jeffparker
    Member
    Plugin Author

    Posted 1 year ago #

    Your method returns categories in list format. You can find other solutions on the web that will only return the category name. Here are some threads that might help you (in addition to the link I posted above):

  • rhiannonmorris
    Member
    Posted 1 year ago #

    All done! :)
    Thank you for your wonderful help.

  • jeffparker
    Member
    Plugin Author

    Posted 1 year ago #

    Glad it's working for you!

  • Topic Closed

    This topic has been closed to new replies.

    About this Plugin

    About this Topic

    Tags