How do I order my loop query?

The Problem $my_posts doesn’t contain any posts. It contains post IDs and likes. And you’re dropping both into post__in, which can’t work. I guess even the number of posts wouldn’t work if the plugin(?) wouldn’t add any post with a 0-x integer to the db-table per default. The Debug Try the following: $my_likes = $wpdb->get_col(“SELECT … Read more

List custom taxonomy specific to one custom post type

Here’s an example that will list all the mobile_review posts that have the term htc_desire_hd in the taxonomy mobile_phone : $tax_query = array( ‘relation’ => ‘AND’ ); $tax_query[] = array( ‘taxonomy’ => ‘mobile_phone’, ‘terms’ => array(‘htc_desire_hd’), ‘field’ => ‘slug’ ); $args = array( ‘post_type’ => ‘mobile_review’, ‘tax_query’ => $tax_query ); $custom_loop = new WP_Query( $args … Read more

Why do next pages load the same content rather then older articles?

Are you using ‘posts_per_page’ and ‘paged’ in the query string? if not try to add $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $query .= ‘posts_per_page=5&paged=’.$paged Number 5 will be replaced with the number of posts after which you want the next page (pagination) link to show up. Also remove the if statement on the next … Read more

Combining action and filter?

A better solution would be to add the filter hooks before the actual call in the template and removing theme when done meaning in your theme before you call your sidebar using dynamic_sidebar or what ever use this: add_filter( ’embed_defaults’, ‘small_embed_defaults’ ); dynamic_sidebar(‘my_sidebar’); remove_filter( ’embed_defaults’, ‘small_embed_defaults’ ); and the same with your main loop: add_filter( … Read more

Sidebar loop – Thematic Framework

I think the problem is that you’re calling get_post() (note: singular) instead of get_posts() (note: plural). EDIT Other problems: The get_posts() function uses the category array key, rather than category_name. The category array key expects category ID, rather than category slug. You’re not wrapping your looped list items (<li>…</li>) properly (i.e. within <ul></ul> tags)