• Resolved delaitec

    (@delaitec)


    Hello.
    I created a custom post type using the “Custom Post Type UI” plugin. everything works fine, with the exception of jetpack features like:
    Comments. Share buttons. Related Posts and Links for taxonomie.

    that are not displayed in this post type.

    See here:
    http://www.capixabamassa.com/delaitv.com

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Contributor James Huff

    (@macmanx)

    Jetpack Comments is just a skin over WordPress’s built-in comment system, so this means that no even WordPress’s comments are loading on your CPT.

    I recommend checking with support for the CPT plugin, as it sounds like they may not be triggering anything after the post meta.

    Thread Starter delaitec

    (@delaitec)

    01 – I created a type of post called “companies”.

    02 – I made a copy of the file “single.php” for the root of the child theme and renamed it to “single-companies”.

    Within this file I renamed the line:
    ————————————–
    get_template_part (‘content’, ‘single’;
    ————————————–
    for:
    ————————————–
    get_template_part (‘content’, get_post_type ());
    ————————————–

    03 – I also made a copy of the file “content-single.php” for the root of the child theme and renamed it to “content-companies.php”

    04 – I’m using the “Generatepress” theme.
    One thing I noticed is that the “pages” on the website also do not display these jetpack features.

    So it seems to me that my types of personalized posts are behaving like “Pages” and not like “Posts”. can this be?

    Plugin Support fresatomica

    (@fresatomica)

    Hm, it could be yes. As @macmanx mentioned above though, we are not really able to help here. You can reach out to the plugin developers for more information or check the general forums at https://wordpress.org/support/forums/.

    Thread Starter delaitec

    (@delaitec)

    I checked again on the standard pages. and the comments are appearing, “I had unchecked the option. What does not appear in the personalized post are share buttons and related posts.

    I try talk with the developers, they telme to talk to jetpack:
    https://wordpress.org/support/topic/the-custom-post-does-not-display-jetpack-share-buttons/#post-12992817

    What i do now?

    Note that the jetpack is also not displaying share buttons or related posts on native pages on my site. This can be a flaw, as the option to display share buttons is enabled on the pages, just as I did on custom posts. Did you even look at the link I sent?

    Thread Starter delaitec

    (@delaitec)

    I tested with the theme Twenty Twenty and the same occurs.

    There are also no show “sharing buttons” or “related posts” on “Pages” or “custom post types” in twenty twenty.

    How can this not be a problem in JetPack?

    Thread Starter delaitec

    (@delaitec)

    It sounds like a joke, but look what happened.

    I had already created several posts of the custom type, and all do not display the related JetPack posts

    Behold, I created a new one, and it exhibited. the problem is that the old ones still didn’t show.

    I then tried to modify an old post, with all the settings the same as the new one, and even then it does not display the related posts.

    Analyzing the code I noticed that the posts in which it is not displayed, in the css there is a “display none” for the jetpack code, but even deactivating it, it does not display the related posts.

    Honestly, I don’t know what else to do.
    The Jetpack team doesn’t seem to be
    interested in solving this bug.

    Follow the link of the new post you are displaying normally.
    https://capixabamassa.com/empresas/tb-producoes/

    And the old post that I set up exactly the same, with the same categories and even the same cover image.
    https://capixabamassa.com/empresas/delaitv-old/

    • This reply was modified 5 years, 9 months ago by delaitec.
    Plugin Contributor James Huff

    (@macmanx)

    Well, the first clue is that comments don’t load. Jetpack doesn’t provide its own comment system, it just drops a skin on top of WordPress’s default comment interface.

    If Jetpack Comments aren’t loading, it means that WordPress’s comments aren’t loading either.

    Try this:

    1. Switch off “Let visitors use a WordPress.com, Twitter, Facebook, or Google account to comment” at Jetpack > Settings > Discussion

    2. Does WordPress’s default comment interface display instead, or is that also missing?

    Thread Starter delaitec

    (@delaitec)

    James, thanks for the help,

    01 – I was able to activate the comments directly in the post. thank you.

    02 – I activated the share buttons by going to the settings of the online jetpack (not inside the site) and activating them to be displayed in the post type “companies”. (I don’t understand why this option is not available within wordpress, and is hidden on another website).

    03 – Why are the related posts still not displayed in “company” type posts? strangely they appeared ONLY at the company “TB PRODUÇÕES” can help me with this, it doesn’t make sense.

    Follow the link of the new post you are displaying normally.
    https://capixabamassa.com/empresas/tb-producoes/

    And the old post that I set up exactly the same, with the same categories and even the same cover image.
    https://capixabamassa.com/empresas/delaitv-old/

    Plugin Contributor James Huff

    (@macmanx)

    Sorry for not asking this sooner, must have slipped my mind. Have you done this yet? https://jetpack.com/support/related-posts/customize-related-posts/#related-posts-custom-post-types

    Thread Starter delaitec

    (@delaitec)

    Hello James did what you suggested, and it didn’t work out.

    I followed all the steps described in the tutorial.

    Plugin Contributor James Huff

    (@macmanx)

    Hm, exactly what code did you use?

    Thread Starter delaitec

    (@delaitec)

    I use this code at the end of the functions file.

    function jetpackme_allow_my_post_types( $allowed_post_types ) {
        $allowed_post_types[] = 'empresas';
     
        return $allowed_post_types;
    }
    add_filter( 'rest_api_allowed_post_types', 'jetpackme_allow_my_post_types' );
    Plugin Contributor James Huff

    (@macmanx)

    That should do it, and empresas is your CPT slug?

    Thread Starter delaitec

    (@delaitec)

    James, sometimes it shows, sometimes not, I believe it is related to the amount of content. you should review this. I do not know the algorithm they use, but it seems that he is not very smart. if you do not find anything that you consider related, you should at least show something, but never leave without displaying anything, the idea of ​​this feature is to make the user continue browsing the site, and sometimes he does not do so.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Jetpack doesn’t work on Custom Posts’ is closed to new replies.