Support » Plugin: Jetpack - WP Security, Backup, Speed, & Growth » Hopefully someone can give a hand

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    The WPAdverts developer was right. Here is how to enable Publicize for Custom Post Types:
    http://jetpack.me/support/publicize/#custom-post-types

    That means that you could use something like this to enable Publicize for your Post Type:

    add_action('init', 'my_custom_init');
    function my_custom_init() {
        add_post_type_support( 'advert', 'publicize' );
    }

    Since the WPAdverts plugin includes a filter named adverts_post_type (#), you can use that filter instead of the code above. That’s exactly what the code the The WPAdverts developer gave you does!

    Thread Starter ibiza69

    (@ibiza69)

    Hi, thanks for the answer. So, I should put this in “THEME” functions.php?

    add_action(“adverts_post_type”, “enable_publicize”);
    function enable_publicize($args) {
    $args[“supports”][] = “publicize”;
    return $args;
    }

    BUT, i´m not sure how to implement this code at functions.php, as everytime I put any code there, the blog gets disordered.

    Any help with this?

    Thanks again for your time 😉

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    You can put this code snippet in your theme’s functions.php, or use a functionality plugin like those:
    https://wordpress.org/plugins/functionality/
    https://wordpress.org/plugins/code-snippets/

    Thread Starter ibiza69

    (@ibiza69)

    Hi Jeremy, thanks again for your nice help.

    Today we could try the CODE WPAdverts developer gave us, using the plugin: https://wordpress.org/plugins/code-snippets

    Code:

    add_action(“adverts_post_type”, “enable_publicize”);
    function enable_publicize($args) {
    $args[“supports”][] = “publicize”;
    return $args;
    }

    BUT, it didn´t work, the autopost doesn´t show at POST ADVERTS or either autoposts new ads.

    We have Publicize activated at JetPack and everything fine, but doesn´t show the options at POST (ADVERTS) SECTION.

    Can be something wrong on the code or have you any idea on how to solve this? It´s very important for us. It´s a fabulous tool that we use in all our blogs, more than 10 😉

    Thank you for your time again.

    Thread Starter ibiza69

    (@ibiza69)

    Hi Jeremy, you can mark this as solved. We found at the https://wordpress.org/plugins/code-snippets plugin, an option for ACTIVATING the code, not only SAVING 😉

    Thanks for all !! WORKING !!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hopefully someone can give a hand’ is closed to new replies.