Forums

Pulling the tags from a post (2 posts)

  1. mar_da_moose
    Member
    Posted 7 months ago #

    Hi all,

    After a bit of digging around, I have found this little nugget of code...:

    <?php
    $post_id = 244;
    $my_post = get_post($post_id);
    $title = $my_post->post_title;
    echo 'Tags: ';
    echo $title;
    ?>

    ...Which works fine for pulling a specific post title, but how do i edit this to get a specific post tags instead?

    Something along these lins im assuming?:

    <?php
    $post_id = 244;
    $my_post = get_post($post_id);
    $tags = $my_post->post_tags;
    echo 'Tags: ';
    echo $tags;
    ?>

    But it doesn't work!

    Any ideas?

  2. mar_da_moose
    Member
    Posted 7 months ago #

    ***bump***

Reply

You must log in to post.

About this Topic

Tags