Plugin Support
Jay
(@bluejay77)
Hi @generalmemetics,
By default, Publicize is only triggered when you publish a new post. You can, however, extend this to other Custom Post Types. You have 2 options to add Publicize Support to a Custom Post Type:
1. You can add Publicize support to an existing post type thanks to the add_post_type_support() function. To do so, add the following code to a functionality plugin:
add_action('init', 'my_custom_init');function my_custom_init() {
add_post_type_support( 'product', 'publicize' );
}
You’ll need to replace “product” with your Custom Post Type name.
2. You can add Publicize support when registering the post type:
// Register Custom Post Type
function jetpackme_custom_post_type() {
$labels = array(
'name' => _x( 'Products', 'Post Type General Name', 'text_domain' ),
);
$args = array(
'label' => __( 'product', 'text_domain' ),
'supports' => array( 'title', 'editor', 'publicize', 'wpcom-markdown' ),
);
register_post_type( 'product', $args );
}
// Hook into the 'init' action
add_action( 'init', 'jetpackme_custom_post_type', 0 );
You can read more about using the Publicize feature with custom post types here:
https://jetpack.com/support/publicize/
I hope that helps! Let us know if you have further questions.
Best Regards,
Jay
Hi Jay, thank you so much! I will look at this, but, you should know that I am not using custom-post types. Just regular posts. What matters is the category of the posts.
In other words, post_type=post, but the taxonomy is the deciding factor. Publicize will ONLY create social posts for category&tag_id=158 … no other category works for post_type=post.
Does that make sense? In other words, Publicize is ignoring posts that have categories other than ID=158.
— Josh