Tag Info

Hot answers tagged

3

Welcome the the WordPress Stack Exchange and congrats on your first post! First off, you may not want to use query_posts() here. Second off - the_post() needs to be before the_title() as it sets up all the posts functions such as the_title(), the_permalink() etc. and queues the next post in your while loop. Your Loop should look like this: <?php ...


2

The multipage setting is not something that happen via a query, it is handled only via global variables, inside the setup_postdata() function. The only thing you need is to increment a global variable and add your static content using the 'the_post' hook that is fired at the end of that function. Something like: add_action('the_post', function(WP_Post ...


1

Just use the public API functions: has_shortcode( $content, $tag );. It uses shortcode_exists( $shortcode ); internally to search the global $shortcode_tags array for the shortcode you are searching for. If that is successful, it uses get_shortcode_regex() to search for the actual shortcode - this will save you quite some time and avoid mistakes. ...


1

You should be using a tax_query for this operation. The category parameters won't work with custom taxonomies Instead of 'category' => $catID, use 'tax_query' => array( array( 'taxonomy' => 'series', 'field' => 'term_id', 'terms' => $catID, ...



Only top voted, non community-wiki answers of a minimum length are eligible