Matt Jaworski on "[Plugin: Matt's PeepSo Blog Posts] custom posts types"

ساخت وبلاگ

wentforgold
Member
Posted 3 days ago #

Hi,
How do i modify this plugin to show custom post types/taxonomies? I'm using a custom post type called "listings"

Regards

https://wordpress.org/plugins/new-blog-post-notifications-for-peepso/

Matt Jaworski
Member
Plugin Author

Posted 10 minutes ago #

Hi,

you can modify the PeepSoBlogPosts::ajax_user_posts() method:

1. add 'post_type'=>'listings' to the $args array.

2. probably you'd have to provide the fist optional argument for the wp_count_posts() call in order to properly count the posts, most likely wp_count_posts('listings')

This will make the list display ONLY this single post type.

Best,
Matt

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 290 تاريخ : جمعه 31 ارديبهشت 1395 ساعت: 10:24