var_dump($query)
-
how do i var_dump query from function
function dp_section_box($args = array()) { $defaults = array( 'post_type' => 'post', 'cat' => '', 'taxonomies' => array(), 'view' => 'grid-small', 'title' => '', 'link' => '', 'post__in' => '', 'posts_per_page' => '', 'hide_if_empty' => false ); $args = wp_parse_args($args, $defaults); extract($args); $posts_per_page = absint($posts_per_page); // Set default posts number if no specified if(empty($posts_per_page)) { if($view == 'grid-mini') $posts_per_page = 8; elseif($view == 'grid-small') $posts_per_page = 6; elseif($view == 'grid-medium') $posts_per_page = 4; elseif($view == 'list-small') $posts_per_page = 3; elseif($view == 'list-medium') $posts_per_page = 2; elseif($view == 'list-large') $posts_per_page = 1; } $args['posts_per_page'] = $posts_per_page; $args = dp_parse_query_args($args); $query = new WP_Query($args); } ; ?>
inside some template to check if its working?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘var_dump($query)’ is closed to new replies.