using jetpack publicize on custom post types

  • Author
    Posts
  • #35054
    Pattie

    I”m trying to add the jetpack publicize feature to publicize me events created using the Events Manager plugin.

    In this article: https://github.com/Automattic/jetpack/issues/8#issuecomment-33793859

    There are 2 ways to add Publicize support to a Custom Post Type:

    1 – If the Custom Post Type is declared via a third-party plugin or in your theme, you can use the add_post_type_support function (ref) in a functionality plugin, like so:

    add_action('init', 'my_custom_init');
    function my_custom_init() {
        add_post_type_support( 'your-custom-post-type-name', 'publicize' );
    }
    

    In my case, “event” is the custom post type, but I need to know where to put that line of code. What file?

    I’ve tried putting into the functions.php file but it was not changed.

    Thanks in advance.
    Pattie

    #35175
    Zed
    Cryout Creations mastermind

    The (child) theme’s functions.php file is the usual spot to place most custom code.

    If that code doesn’t work, you may need to double check if it actually does the task it is supposed to do (are all the identifiers correct? is this code sufficient for the task?)


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘using jetpack publicize on custom post types’ is closed to new replies.