Filter page ID outside the loop and order
Filter page ID outside the loop and order
Filter page ID outside the loop and order
How do I create a term for every value of a post meta?
WPNavi pagination links not working on custom pages
Allowing null vairiable
How to display content depending on the Woocommerce Product Category
Get full slug for a WordPress Post
Hide old posts each year
I wouldn’t do this with a “count” that is reset on the loop, but instead use some of the items in the WP_Query object, like paged value. You can use that to interpret that you are on the second or subsequent pages and then if you are x item on y page (or some other … Read more
Of course, you can use conditions like this inside the loop. if ( ‘event’ == get_post_type( get_the_ID() ) ) { // do something } Full code would be // The Loop if ( $query->have_posts() ) : ?> <?php if ( is_home() && ! is_front_page() ) : ?> <header> <h1 class=”page-title screen-reader-text”><?php single_post_title(); ?></h1> </header> <?php … Read more
Two loops in CPT archive page, exclude posts from main query