Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS make div ‘classes’ the post tags

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #44198
    JokerMartini
    Participant

    In a for loop going through all posts how can I append all the tags of the post as part of the class of a div?

    $page_name = $wp_query->post->post_name;
    query_posts(‘category_name=’. $page_name .’&posts_per_page=-1&orderby=date&order=DESC’);
    ?>

    Sorry, no posts matched your criteria.

    #132229
    JokerMartini
    Participant

    so for example if one post had 3 tags as: Photo, Outside, Ground it would be marked up as

    #132232
    TheDoc
    Member

    Very easy!

    >
    #132234
    JokerMartini
    Participant

    Nicely done.
    Thank you very much.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.