WP_Query do not include posts with a certain value in a custom field –

Try adding the type parameter: $args = array(‘post__not_in’ => $exclude, ‘ignore_sticky_posts’ => 1, ‘posts_per_page’ => 5, ‘meta_query’=> array( array( ‘key’=>’my_featured_post’, ‘value’=> 1, ‘type’ => ‘numeric’, // assuming your custom_value is an int, not a string. ‘compare’=>’!=’ ) ) ); $query = new WP_Query($args);

Query multiple taxonomies with pagination

May be this will help: …….. …….. if(isset($_POST[‘genre’])) { $myquery = array( ‘showposts’ => 20 , ‘orderby’ => ‘title’, ‘order’ => ‘ASC’, ‘paged’ => $paged, ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘anime_genre’, ‘terms’ => $_POST[‘genre’], ‘field’ => ‘slug’, ‘operator’ =>’AND’ ) ) ); } query_posts($myquery); ……

Loop issues when creating custom query for media uploader

I’m not entirely sure why the get_posts() function works instead of creating a new instance of WP_QUERY. From what I understand about how WordPress queries work, get_posts() is actually creating it’s own instance of WP_QUERY anyhow. Either way, here is the solution that I’m using currently. <?php //GET THE PHOTOGRAPHERS $args = array( ‘post_type’ => … Read more

Include subtitle display to slideshow

Subtitles aren’t standard in wordpress so it’s hard to know where to find yours. This code needs to be placed in the frontpageSlideShow function. Below where it says //format informations add: $subtitle = //wherever your post subtitles can be found, probably in a custom //meta Then, you need to add your subtitle to the $fscontent … Read more

How to display comments list by order when clicking on newest or oldest link?

Just open the comments.php file from your theme. Find the following line (or similar) <?php foreach ($comments as $comment) : ?> Add this lines just above it if (isset($_GET[‘comOrder’]) && $_GET[‘comOrder’] == ‘Newest’ ) $comments = array_reverse($comments, true); so your code looks like this: <?php if (isset($_GET[‘comOrder’]) && $_GET[‘comOrder’] == ‘Newest’ ) $comments = array_reverse($comments, … Read more

Query is not work

I think the problem is in your transient set_transient( “7677recent_$my_paged”, $my_query, 60 * 60 ); This is currently refreshing every 1 hour you could try changing it to 3 or 5 mins for testins