WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] No tags? help with bunny tags (10 posts)

  1. icco
    Member
    Posted 9 years ago #

    My question is that i added bunny's tag plugin around post 300. i dont really want to go and retag all of my old plugins. is there a way to make it so that if there are no tags, it says, "No Tags" not just a blank line?

  2. Ultimate Tag Warrior will do this one it is completely installed (installed, activate, and called from the index via a php tag).

    http://www.neato.co.nz/ultimate-tag-warrior/

  3. icco
    Member
    Posted 9 years ago #

    hmm okay, but does this read from the stuff i already have for bunny?

  4. No, sorry. You didn't mention anything about already having tags.

  5. icco
    Member
    Posted 9 years ago #

    i do on my last 20 posts, which isnt that big of deal, but still.

    ill look into this one though, it looks nice.

  6. ChristineD
    Member
    Posted 9 years ago #

    You can probably import the tags from bunny's plugin - There's a bit for importing data from custom fields; but I haven't tried it with this particular plugin.. (You give it the name of the custom field; and the seperator, and it'll turn the values into tags. It'll go back the other way too (: )

  7. icco
    Member
    Posted 9 years ago #

    hmm thats interesting i didnt see that. i still wish there was an easy way to make bunny do what i want it to :/

  8. icco
    Member
    Posted 9 years ago #

    okay i got this new plugin all working, its way more complicated that bunny, which isnt nessisarily bad thing, but whatever, it works. thanks guys

  9. Ming
    Member
    Posted 9 years ago #

    If you really want to use Bunny's tags then make the following change in bunnys-tags.php. Replace the function get_bunny_tags_list (lines 115-130 ish) with this:


    // prepare the formatted list of tags -- this is what you mess with if your custom field values aren't formatted like described in the instructions
    function get_bunny_tags_list($before, $after, $separator)
    {
    global $bunny_strict;

    $technorati_tags=get_bunny_tags(' ', 'tags');
    $label="Tags";
    if(empty($technorati_tags)&&!$bunny_strict)
    {
    $technorati_tags=get_bunny_tags(', ', 'keywords');
    $label="Keywords";
    }
    if (empty($technorati_tags)) {
    $technorati_tags_list="No Tags";
    return($technorati_tags_list);
    } else {
    $technorati_tags_list=output_bunny_tags($technorati_tags, $before, $after, $separator);
    return($technorati_tags_list);
    }
    }

    It's a quick fix. If there are no tags found then it returns the phrase 'No Tags'. You can change this in the code and also include any html you want (for instance, <p class="tags">No Tags</p>).

    Don't forget if you ever upgrade Bunny's Tags you'll lose this!

  10. icco
    Member
    Posted 9 years ago #

    cool thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic