WordPress.org

Ready to get started?Download WordPress

Forums

Getting Post ID, Name and Category for use in Plugin (1 post)

  1. mitel
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic