Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

PHP code to apply a Content Template to a Custom Post Type

$
0
0

Hello. Love these plugins. Thanks for all the hard work

I have a Custom Post Type for "Affiliate Products" and a Content Template for that post type. This all works great most of the time. Except for one situation. I use a plugin called wp-all-import to automatically import and create and regularly update Affiliate Products. Sometimes Affiliate Products "lose" their Content Template setting for some reason when using wp-all-import.

So basically, I just need to know what line of code I can use to apply a Content Template to a given post. I know where to put the code. Just need to know what the right code is.

I'm envisioning that something like this exists:

apply_custom_template_to_post($post_id,$content_template_id);

Thanks!


Viewing all articles
Browse latest Browse all 20145

Trending Articles