Home › Forums › Calendar Products › Events Calendar PRO › Publicize is not working on the Events Pages
- This topic has 4 replies, 2 voices, and was last updated 11 years ago by
Brian.
-
AuthorPosts
-
April 14, 2015 at 8:39 am #955455
Dale Norenberg
ParticipantWe are using Jetpack to publicize our posts. As you can see from the screen capture in the right sidebar of a post page, publicize shows in the publish section of the page. This does not show on the events pages. Is there some code that needs to be added?
Screen capture:
April 14, 2015 at 12:38 pm #955517Dale Norenberg
ParticipantI also asked Jetpack how to add the necessary code. This is their answer.
http://jetpack.me/support/publicize/#custom-post-types
How to use Publicize with your Custom Post Types
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:
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” by your Custom Post Type name.You can add Publicize support when registering the post type, like so:
// Register Custom Post Type
function 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’, ‘custom_post_type’, 0 );Can you tell we which file in the Events Calendar Plugin directory I should add the code to.
Thanks,
Rochelle
April 14, 2015 at 12:45 pm #955522Brian
MemberHi Rochelle,
That coding should be entered into your theme’s function.php
The custom post type for events is:
tribe_events
Thanks
April 15, 2015 at 7:23 am #955693Dale Norenberg
ParticipantThanks, that worked
April 15, 2015 at 9:52 am #955772Brian
MemberGreat glad it helps.
I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic on the forum and we can help you out.
Thanks
-
AuthorPosts
- The topic ‘Publicize is not working on the Events Pages’ is closed to new replies.
