I’m trying to add a ‘Lessons’ post type to populate the wp-query as well as the pre-existing post type ‘Modules. Preferably I would like them to be combined into one query showing the most recent 6 posts. I’ve only been able to get them showing in 2 different queries thus far.

<?php 
//Template Name: Last 6 Modules
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'ca_show_last_six_modules' );
function ca_show_last_six_modules(){ 
$modules = new WP_Query(array(
    'post_type'         => 'module',
   'orderby'            => 'menu_order', 
    'order'                 => 'ASC',
    'status'            => 'publish',
    'posts_per_page'    => 6

));
if (...


This is only a snippet of a WordPress Website Design Article written by Tyler

Read Full Article


Content Disclaimer 

This Content is Generated from RSS Feeds, if your content is featured and you would like to be removed, please Contact Us With your website address and name of site you wish to be removed from.

Note:

You can control what content is distributed in your RSS Feed by using your Website Editor.

Tech Shop Offers