• 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?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Pulling the tags from a post’ is closed to new replies.