retrieve multiple pages and posts/ category for Home page, using query_posts?
-
Hi
I am wanting to feature on my home page only in an archive type feed, pages and posts (or a category) – using WordPress php and codex
this is the code I have worked on to date for the functions.php file of my theme
function child_before_loop () { global $query_string; if( is_home() ) $args = array( 'post_type' => 'page', 'post__in' => array(19) ); $categoryvariable = $cat; $args = 'cat=10' . $categoryvariable . '&orderby=date&order=ASC'; query_posts( $args ); } add_action('genesis_before_loop', 'child_before_loop'); add_filter( 'genesis_seo_title', 'child_header_title', 10, 3 );
[Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
I have also used this code below for categories only which works
function child_before_loop () { global $query_string; if( is_home() ) query_posts($query_string . "&cat=10"); } add_action('genesis_before_loop', 'child_before_loop'); add_filter( 'genesis_seo_title', 'child_header_title', 10, 3 );
[And again…]
so the challenge is how to call cat10 posts and page id 19 at the same time.
sure it must be simple but I am not seeing it.
thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘retrieve multiple pages and posts/ category for Home page, using query_posts?’ is closed to new replies.