In category.php, I want to get list of posts in that category. I found two ways: using get_posts($args) and The Loop. get_posts() way $args = array ( "category" =>...
I can’t seem to get drafts to show up with WP_Query, even when post_status is set to ‘any’ or ‘draft’ $args = array( 'p' => 1234, 'post_type' => 'any',...
How can I separate posts by year in archive page for Custom Post Type? while ( have_posts() ) : the_post(); the_title(); the_post_thumbnail('thumb'); endwhile; The end result would look something...
I have a list of terms I’m displaying using “get_terms”. Each term is linked so if the user clicks it, they go to the term archive page. <?php $terms...
How could i get List of all the Authors? author.php file shows the Information about Individual Author. for example: http://domain.com/author/bj that returns the Bj’s Profile. if i enter http://domain.com/author...
I’ve seen some examples that use $_post instead of $post. What’s the difference and when would you use $_post instead of $post? Example: if (have_posts()) : while (have_posts()) :...
I would like to use the default category for my custom post type, but when I open the category page there’s no posts there. The loop is very simple:...
Im having a problem where for some reason, a basic loop im trying to add to a sidebar keeps….keeps looping on interior pages (single and page .php ) but...
I want to show 5 posts per page but limit total number of posts being resulted in a loop. $args = array( 'post_type' => 'post', 'posts_per_page' => 5, 'paged'...
I have a custom post type called vacancies and another called our_homes How do I get the google map coordinates from our_homes and display inside the vacancies single post...