Support » Plugins » Getting Post ID, Name and Category for use in Plugin

  • mitel


    I want to create a HTML select tag populated with the Post Title and with the value of the post ID for use in a small Plugin I am working on.
    I only want Posts that are assigned to a certain category, i.e. latest-news.
    I am confused with the database structure WP uses and cannot formulate a SQL query to retrieve the result set I want.
    I am also using the $wpdb->get_results syntax.
    Can anybody create the SQL query that will return the Post Title, Post ID and Post Category?
    I am using WP 3.4.2.
    Thanks in advance people.

  • The topic ‘Getting Post ID, Name and Category for use in Plugin’ is closed to new replies.