WordPress.org

Ready to get started?Download WordPress

Forums

Add a footer to every post in the feed (3 posts)

  1. MultiformeIngegno
    Member
    Posted 6 years ago #

    Hi!
    I'd like to add in my feed a small footer to every post, like: "Do you like this post? Search others in [Same category of the post]."

    I use the "Feed Layout" plugin, but I don't know how to display the category...

    Is there a <?php bloginfo('SOMETHING'); ?> that displays the category of a specific post?

    And... other question... is there a list of all <?php bloginfo('XXXX'); ?> used in WordPress?

    Thansk in advance,
    Lorenzo Raffio

  2. syncbox
    Member
    Posted 6 years ago #

    you can use the_category(); as in:

    <p class="postfooter">Do you like this post? Search others in <?php the_category(', ') ?>.</p>

    then use the class to style how this appears visually. Should work just fine. The comma is what would appear between categories IF the post belonged to more than one category.

    As for searching for it, you'd wrap a link around the category... hmmm... but this would return all posts in whichever one was clicked... I am sure you can come up with a js script to dynamically write the name of the category into the input#s field of the searchform with a little effort. I'd do it, but I really should be working ;)

    JS gurus out there? I'm just a hack.

  3. MultiformeIngegno
    Member
    Posted 6 years ago #

    @syncbox: Thanks!!! Is there a JS Guru? :P

Topic Closed

This topic has been closed to new replies.

About this Topic