[Plugin: Clean Archives Reloaded] Altering "Post Type" in Query by passing parameters ?
-
Hi,
First of all, Big thanks for the plugin ??
I am trying to use the plugin shortcode at 3 different instances in the same page. Each instance need to list the post according to particular “post type”.
I see, in your code the default post-type as “post”. Is it possible to pass parameter to the plugin ?
May be a shortcode with argument like below is what we need:
[cleanarchivesreloaded(‘post-type-1’)]
[cleanarchivesreloaded(‘post-type-2’)]Accordingly, the query on Line number 217 in the plugin , the value of post_type should get replaced with “post-type-1” or “post-type-2”.
// A direct query is used instead of get_posts() for memory reasons $rawposts = $wpdb->get_results( "SELECT ID, post_date, post_date_gmt, comment_status, comment_count FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' AND post_password = ''" );
Or if you have another solution, please do let us know.
Many thanks again
Jaz
- The topic ‘[Plugin: Clean Archives Reloaded] Altering "Post Type" in Query by passing parameters ?’ is closed to new replies.