Tag Info

New answers tagged


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


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