WordPress.org

Ready to get started?Download WordPress

Forums

Mini Footer - Plugin Request (7 posts)

  1. planetphillip
    Member
    Posted 7 years ago #

    Hi,

    I would like the ability to automatically add certain text/images/links to the end of posts based on the category they are in. For example in one category I want to add a copyright notice and at the end of another a disclaimer.

    Does anybody know of such a plugin? WOuld anybody be willing to create one?

    TIA

  2. kdmurthy
    Member
    Posted 7 years ago #

    What is supposed to happen when a post belong to multiple categories?

    -- KD

  3. planetphillip
    Member
    Posted 7 years ago #

    It would add both mini footers.

  4. kdmurthy
    Member
    Posted 7 years ago #

    I dont know of any available plugins - but it will be trivial to get this up. You can use the category description field to add the blurb you want for each category.

    At the end of your post add code similar to this:

    <?php
    foreach((get_the_category()) as $cat) {
    echo $cat->category_description;
    } ?>

    Hope this helps.

    -- KD

  5. planetphillip
    Member
    Posted 7 years ago #

    Thanks for the Solution. Unfortuantely I use the cat desctiption already and it doesn't contain the type of text I would like. However, if tis is the only way (And your solution is very simple) then I may have to re-think things. Thank you.

  6. lauch
    Member
    Posted 7 years ago #

    I think you're looking for in_category, which is used inside the loop:

    http://codex.wordpress.org/Template_Tags/in_category

  7. planetphillip
    Member
    Posted 7 years ago #

    This looks like it could work. Thank you for the link.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.