Disabling the Admin Bar | Where does code go?

This would go in your theme’s functions.php file. This is a small tweak, but things to remember are that: If you ever change your theme, you’ll need to remember to copy this over to the new theme It’d be better to put these types of “system tweaks” into your own plugin, which you can read … Read more

Order by meta values

You can do this by just looking for release_date_db: function plugin_name_get_posts() { global $wpdb; $the_posts = $wpdb->get_results( “SELECT * FROM $wpdb->posts, $wpdb->postmeta WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id AND meta_key = ‘release_date_db’ AND meta_value >= 20120000 AND meta_value <= 20121231 ORDER BY meta_value ASC;”, ARRAY_A ); }

Pagination in custom query not working [duplicate]

I believe the query var that you are retrieving should be paged and not page. See the codex and adjust your query to the following: $products_query = new WP_Query(array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 4, ‘paged’ => (get_query_var(‘paged’) ? get_query_var(‘paged’) : 1), )); However, if this is an archive for your product post type why … Read more

Exclude Author by ID

Where $that_user_your_filtering_out is the user/author ID you wan’t to filter out, make this modification to your loop foreach ($blogusers as $bloguser) { // modification starts here if($bloguser->user_id == $that_user_your_filtering_out){ continue; } // modification ends here echo ‘<div class=”content-slider-body”>’; $user = get_userdata($bloguser->user_id);

Random order of posts on each request

Use jQuery on your page to sort the divs. Ideally you want your divs to all have the same CLASS so you can identify which divs to randomize. I’m not familiar with the thesis theme but presumably there is a testimonials.php or something similar you could modify. If so, add your jQuery in there. Here’s … Read more