Skip Navigation

[Closed] Adding Publicize to Custom Post Types

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

Tagged: 

This topic contains 13 replies, has 3 voices.

Last updated by Waqas 9 years, 7 months ago.

Assisted by: Waqas.

Author
Posts
#238526

Hey there!

I've been trying to add The Jetpack Publicize functionality to my custom post types made with your plugin Types without much luck.
I've found two other Forum inputs here and have tried both solutions with no luck.
So here's where it becomes interesting, in the custom-types.php there's a reference to a hook wpfc according to the forum topics. However when I open my custom-types.php there aren't even that many lines and there is no wpfc hook anywhere. -confusing-
So I tried to google the problem for a bit found some comments about setting the publicize array to true. Also managed to do this in the Types/Embedded/Includes/custom-types.php I found the supports array and added 'Publicize' => true to it.
And it showed up once I think at least, I though I had fixed it however when I pressed publish on my custom post called innovation and checked my facebook if the post had been shared there was no message on it.
I went back to the backend of the innovation and suddenly the publicize options were gone again as well. I figured maybe its cause I already published this post, tried making a new one but no publicize options showed up anymore.
Not sure if it has anything to do with this, but I had also posted the english version of this custom post in the meanwhile. Before the options dissapeared.
Anyway I'm really hoping you can help me out to get the Publicize to work with the Types plugin custom posts.
Can someone give me a clear step by step how to add publicize functionality to them?

Thanks in Advance!

#238785

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Please consider reading a relevant thread at https://toolset.com/forums/topic/add-publicize-to-types-cpt-jetpack-publicize/#post-197586 - this addresses your issue in detail, while provides a good solution.

For more reading on Jet Pack's Publicize, please refer to hidden link

Please let me know if there is anything I can assist you with.

#238814

Dear Waqas,

As I had already stated in my first post. I have already tried the solution from thread "https://toolset.com/forums/topic/add-publicize-to-types-cpt-jetpack-publicize/#post-197586" with no effect at all. I have also read the entire post from the jetpack support about publicize.
Where there is stated that I have to place the "Publicize" in the Support => Array.
I have done so as instructed by Jetpack and found the support array in the file Types/Embedded/Includes/custom-types.php where I have added 'Publiicize' => True.
HOWEVER, as I stated in my post there is still NO Publicize options to be seen on my custom post Innovations.
So Neither solution you've suggested in your answer has worked for me. I am unsure if I missed anything because I also read in the jetpack support that for the action: add_post_type_support() which I found in the functions.php from the Types Plugin that I would have to add the following to the Functionality Plugin (I am assuming this means Types).
add_action('init', 'my_custom_init');
function my_custom_init() {
add_post_type_support( 'product', 'publicize' );
}
Where product for me would be innovations-1 as that is the slug for my custom post.
I have tried adding this to the functions.php from my theme, and I've tried adding it to the functions.php from Types both with no result.
When I added it to types functions.php it even resulted in a white screen of the WP Admin.
So I'm unsure of where or how to edit the Types plugin so that it will support Publicize properly.
I hope you can help me with this issue.

Thank you in advance

#238848

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I am sorry if it didn't help you. May I ask for access information to your site's code and word press admin area?

I have enabled the Private Details Box, please input any sensitive access information in that box. So I can take a deeper look into the issue.

#238863

Hello Waqas,

Ofcourse you may,

I would appreciate though if you would let me know what you have had to alter for my future reference.
I also realized that The Events Manager's customer posts were also not being publicized I know this is not your area of responsibility as that is not your plugin.
But I would appreciate a solution for all custom post types if possible. If not than I understand if you just like to focus on the problem of Types with Publicize.

Thank you in advance.

#239102

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing the access info. I have just reviewed your website.

Can you please link your JetPack with your WordPress.com account? Also, please link/activate Publicize with your required social accounts. Linking with Facebook at-least will give a good go-ahead for testing.

Please let me know when these are linked, so I can test the issues.

#239123

Hi Waqas,

I've linked the page to the wordpress.com on your account. I didn't realize I had to activate this seperately on other users as mine already had it activated.
The page has sharing functions shared among all the users, so your user access also has sharing options for Facebook, LinkedIN, Google and Twitter.
The Custom post types are both Events and Innovations-1 as slugs.

Let me know if you've found anything, regards Charlene

#239155

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I have taken a look into your site and have also added the post type support for Innovaties and Events, in theme's functions.php. But surprisingly these do not work.

Everything else looks fine, and causing no suspect for broken or missing functionality. However, I need to look into more details and will get back to you with my findings soon.

#239163

Did you use the innovations-1 slug or the name of the custom post Innovaties? Because as far as I know it would work only with the slug.
I've run into similar issues when I made the Archive page for the events and Innovaties that it didn't work because I used the name rather than the slug.
Also the Active Theme on the website is LE-Network v4, just saying to make sure you used the correct functions.php.
Not sure if this information helps you any but I figured it might so best to let you know.

#239512

Waqas is not availiable for today, I have modified the codes in your theme/functions.php as below:

// Added by Toolset Support Team - August 27, 2014

/* add_action('init', 'my_custom_init');
function my_custom_init() {
    add_post_type_support( 'event', 'publicize' );
	add_post_type_support( 'innovations-1', 'publicize' );
} */

add_filter('wpcf_type', 'jetpack_publicize_func', 10, 2);
function jetpack_publicize_func($data, $post_type)
{
$arr = array('event', 'innovations-1');
if(!in_array($post_type, $arr)) return $data;
$data['supports'][] = 'publicize';
return $data;
}

Please check again, if the problem is fixed or not

#239587

Hi luoy,

Thnx for trying, unfortunately the code you added has zero effect.
Neither the Events nor the Innovations have the publicize function added.
Still exactly the same as before.

Also I noticed that is the code from one of the forum posts Waqas and me already discussed in the former reactions.
I have already tried this myself as well without any luck.

#239752

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Can you please consider trying following options?

1. Try disabling other plugins, to see if it helps making it to work.
2. Try out with a clean word press installation in a separate directory or probably on you local host.

We have discussed this issue in detail, and have tried recreating the problem on our local hosts, as well as, on some live sites. Unfortunately we couldn't recreate the problem, but in fact the solutions worked well for us. The same solutions have been proposed to some other users in past, and been working fine.

Please let me know if this helps resolving the issue, and I can help you with anything else related.

#239816

Hi Wasaq,

I made a clone from the current website on a testing subdomain and noticed the following.
The code from Luoy, for innovations started working once I switched my theme back to Twenty Fourteen.
So apparantly it's a theme Issue. My theme was generated with Artisteer, and there might be something about it that conflicts with the plugin somehow.
Unfortunately I can't just switch the theme since it was completely customized for this website.

So I just wanted to say thanks for all the help so far.
I'll see if the Artisteer support can advice me further on this matter.

Regards Charlene

#240227

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your feedback, I am going to close this thread, please create another thread if you have other problem.

The topic ‘[Closed] Adding Publicize to Custom Post Types’ is closed to new replies.