Created
July 12, 2014 01:27
-
-
Save curtismchale/34ddb84e04db01aeb68d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Abstracting the featured Ads Query so that we don't have to retype it all over | |
* | |
* @class WP_Query | |
* @uses wp_parse_args | |
* | |
* @since 1.0 | |
* @author SFNdesign, Curtis McHale | |
*/ | |
class Paths_Portfolio_Query extends WP_Query{ | |
function __construct( $args = array() ){ | |
$args = wp_parse_args( $args, array( | |
'post_type' => 'portfolio', | |
'posts_per_page' => '4', | |
'orderby' => 'rand', | |
) ); | |
parent::__construct( $args ); | |
} // __construct | |
} // Paths_Portfolio_Query | |
$new_query = new Paths_Portfolio_Query( array( 'posts_per_page' => '10' ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment