• Resolved Jorim

    (@jorim)


    I’m using wpdb to retrieve the posts I like to show on my home page (is_home()). I achieved this with a very nice piece of code from MichaelH. That specific problem was resolved so everybody is going to ignore that topic ??

    I’m trying to do the same for the category page, but that messes up my page. I use $catid = get_query_var('cat') to retrieve the category and added

    AND (
    $wpdb->term_taxonomy.taxonomy = 'category'
    AND $wpdb->term_taxonomy.term_id IN ('".$catid."')
    )

    to the query. The retrieved posts are correct, but my modified sidebar is behaving as if the page is_home() instead of a category page. Can somebody tells me whats happening?

    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wpdb query to retrieve posts messes up category page’ is closed to new replies.