Tag Info

New answers tagged

0

At the beginning of your function add: if ( has_post_format( 'image' ) ) { return; }


1

You're right. It isn't a good structure. You are running three queries on the page-- the two you are creating plus the main query that is being completely ignored (plus ancillary queries). You are also clobbering the main query halfway through the page load when you overwrite $wp_query, which can cause unexpected and unpredictable results and difficulty ...



Top 50 recent answers are included