WordPress How to display Post Title and its Tags in a table

Hello everyone in wordpress I was wondering how to QUERY the POST TITLE and the TAGS inside those POST. I have now queried the POST title POST date but Im missing the POST TAGS because it is located on different table and I dont know how to Select the TAGS inside each POST.
Thank you, any reply is deeply appreciated thank you very much

Related posts

Leave a Reply

1 comment

  1. How would soemthing like this work for you. It basically says to display everything in the left table (wp_posts) then it matches the post id’s in both tables and displays tags if tags exist. Some variation of this should work for you. There might we a little screwing around to get this to work right but this is the idea anyway.

    SELECT wp_posts.ID, wp_posts.post_title, wp_posts.guid, wp_posts.date, 
    othertable_othercolumn
    FROM wp_posts
    LEFT JOIN othertable
    ON wp_posts.ID=othertable.ID
    WHERE wp_posts.post_type='post' AND wp_posts.post_status ='publish'
    

    by other column i mean the column name of your tags, othertable is the name of the other table