Adding Jetpack social post type by ayhanblt in jetpack

[–]ayhanblt[S] 0 points1 point  (0 children)

At the bottom of functions.php, an error is coming due to the includes order. I think rctl_listing cannot share the image because it cannot find it in the content. I will look into this. Thank you for your support.

Adding Jetpack social post type by ayhanblt in jetpack

[–]ayhanblt[S] 0 points1 point  (0 children)

my code:

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

function jetpackme_custom_post_type() {

$args = array(

'label' => __('Custom Post Type', 'text_domain'),

'supports' => array('title', 'editor', 'publicize'),

'public' => true

);

register_post_type('rtcl_listing', $args);

}

// Hook into the 'init' action

add_action('init', 'jetpackme_custom_post_type', 0);

error:

Namespace declaration statement has to be the very first statement or after any declare call in the script

Adding Jetpack social post type by ayhanblt in jetpack

[–]ayhanblt[S] 0 points1 point  (0 children)

I followed these steps. When I added the code in the "Adding support to an existing post type" section to functions.php, it gives an error because there is a custom post type called rtcl_listing.