Latest post shortcode to support custom post types?
-
Hello,
I use Classipress for an ad listing website.
Classipress uses a custom post type named “ad_listing” with the taxonomy “ad_cat” for categories.
Now, I edited code to match this (in functions/alo-easymail-placeholders.php):
function alo_em_placeholders_title_easymail_post ( $post_id ) Original Line ~76: $args = array( 'numberposts' => $n_last_posts, 'post_type' => 'ad_listing', 'order' => 'DESC', 'orderby' => 'date' ); function alo_em_placeholders_title_custom_latest ( $post_id ) Original Line ~717: $cat_args = array( 'show_option_all' => esc_html( '(no, all categories)' ), 'taxonomy' => 'ad_cat', 'name' => 'placeholder_custom_latest_cat' ); function alo_em_placeholders_get_latest ( $content, $newsletter, $recipient, $stop_recursive_the_content=false ) Line ~758: $args = array( 'numberposts' => $limit, 'post_type' => 'ad_listing', 'order' => 'DESC', 'orderby' => 'date' );
This is not working, although it should.
I obviously want to show latest ads from the Classipress post type instead of regular blog posts.Any idea why this doesn’t work?
Thanks in advance.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Latest post shortcode to support custom post types?’ is closed to new replies.