How can I sort by meta value? In meta value I have “price” (float). I make this query, but always get Sorry, no posts matched your criteria. $posts =...
I’m using the following to bring up a tag archive page: <?php query_posts( "tag=". '' . single_tag_title( '', false ) . '' ); ?> This works perfectly for all...
I have a front end form that let users submit a post. This is how i store the data when a post is submitted : if ( isset( $_POST['submitted']...
So I have a wp_query which is getting the 5 most recent posts from my WordPress site. What I want to do is from within this query, grab the...
I am trying to add a button to take the viewer to a random post. Below’s the code I am using:- <?php query_posts(array('orderby' => 'rand', 'posts_per_page' => 1)); if...
I am writing a custom loop query to filter through a custom post type and custom taxonomy. I have replaced any variables with static values for the purpose of...
I’m trying to show result for a custom field that is not empty on a custom post type but getting no results? <?php if (have_posts()) : $args = array(...
I’m building a custom homepage for a client where they want to have a few changeable boxes to link to specific pages, or posts, within the site. I’ve added...
How would we query posts as long as the post does not equal the ID 2047? Here is the current query. <?php $args1 = array( 'post_type' => 'options', 'tag_slug__and'...
I have a custom query to get the post title, permalink, and featured image. However the Post title is displaying but not in the container I want it in....