Glad to help. Currently the plugin only supports WP Posts and Pages. In the next version of the plugin, I will add a filter hook that can be used to add any Custom Post Type(s). Thank you for the feedback.
Thread Starter
—
(@educationguideonline)
Thank you very much. I just uninstalled that plugin due to lack of this feature. I am now waiting for your next update.
Thread Starter
—
(@educationguideonline)
Sir, I am still waiting for Custom Post Type availability. I am eagerly waiting sir.
Was added two versions ago. The hook is named usp_post_type, which can be used to filter the post type. You will need to add your own code to do the filtering.
Thread Starter
—
(@educationguideonline)
Can you please provide me with a sample code? I am not expert in PHP.
Add this to functions.php:
function usp_modify_post_type($post_type) {
return 'post'; // edit post type as needed
}
add_filter('usp_post_type', 'usp_modify_post_type');
Then change the post type (where it says “edit post type as needed”) to whatever you want.
Hey.. I just saw this.. and am trying to do this myself…
Just so I am clear since I don’t really know a lot of coding, am I updating what is after the $ above?? So, if I have a custom post type called “Case_Studies“, would I change the above code to:
function usp_modify_post_type($Case_Studies) {
return ‘post’; // edit post type as needed
}
add_filter(‘usp_post_type’, ‘usp_modify_post_type’);
Do I have that correct?
Thanks.
Michael
Hey, actually no the // edit post type as needed is on the same line that needs to be edited. So you want to edit the post only. Change it to Case_Studies and you should be good.
-
This reply was modified 8 years, 1 month ago by
Jeff Starr. Reason: clarity