• Hey, I want to take stuff from category. Like this.

    “Posttitle – categoryname”

    Mysql:

    SELECT ‘ID’ FROM wp_posts AND SELECT ‘object_id’, ‘term_taxonomy_id’ FROM wp_term_relationships AND SELECT ‘term_id’ FROM wp_term_taxonomy limit 0, 10

    Note: the query is not right.

    $postid = $row[‘ID’];
    $objectid = $row[‘object_id’];

    And so on.. or wth. I’m just confusing myself now.

    I want to take out the recent posts in a category, in this format.
    “Posttitle – categoryname” with link to the post of course.

    I’ve read this, I can take stuff out from DB with this. But not crossing tables. https://codex.www.ads-software.com/Function_Reference/wpdb_Class

    Any help on this?

    Thanks!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Mysql pick stuff from category.’ is closed to new replies.