Forums

Display post tags. (4 posts)

  1. purplemannequin
    Member
    Posted 2 weeks ago #

    hi, i'm currently trying to have my post tags under the post.
    but when there are no tags for a certain post it doesn't show anything.
    but the background still shows.

    i was wondering if i could use an if statement.
    so that when a tag is available it will echo the span.

    this page shows this example:

    (this is only part of the example)
    <?php if (get_the_tags()) the_tags(); ?>

    but like i was saying how would i go about doing this?

    what i was thinking was something like this:
    IF TAGS ARE SET {<span class="tags"><?php the_tags(); ?></span><br />} END IF TAGS ARE SET

    Any and All help is appreciated. :]

  2. purplemannequin
    Member
    Posted 1 week ago #

    bump

  3. purplemannequin
    Member
    Posted 1 week ago #

    bump

  4. Kalon
    Member
    Posted 1 week ago #

    Just do:

    <?php  the_tags(<span class="tags">',' ','</span><br />');  ?>

    Then if there are no tags, nothing will show.

    Hope that helps.

Reply

You must log in to post.

About this Topic