Forums

Facebook Page Publish
[resolved] Custom Post Type (7 posts)

  1. floatgraphics
    Member
    Posted 1 year ago #

    Does this/can this work with custom post types?

  2. glaze0101
    Member
    Posted 1 year ago #

    I ran into this problem as well. Works fine for regular posts and pages, but not for my custom post types.

  3. condor85
    Member
    Posted 1 year ago #

    I've figured out how to alter the code to allow custom post types...

    open fpp_index.php

    look for the comment *Action Handler

    you will see...

    add_action('future_post', 'fpp_future_action');
    add_action('publish_post', 'fpp_publish_action');

    I have a custom post type called "wholesale", so I added this below it...
    add_action('future_wholesale', 'fpp_future_action');
    add_action('publish_wholesale', 'fpp_publish_action');

    Next find locations where it says

    and change it to
    if (is_object($post) && ($post->post_type == 'post')|| $post->post_type == 'wholesale')

    there are just a few places where you have to change it.
    Note: if you upgrade this plugin later.. you will have to add these changes again manually. This is a work around until the author adds custom post type support.

    (note, this can also work for pages. instead of "wholesale" just type pages)

  4. mtschirs
    Member
    Posted 10 months ago #

    Hi condor85,

    Thank you for posting your modification. I integrated this into the upcoming version 0.3.7, as always feedback is appreciated (0.3.7 will be released today / this weekend).

  5. trancesetter
    Member
    Posted 7 months ago #

    Hi there,

    I've got the same problem. My website uses the custom post type "Portfolio". But for some reason the plugin doesn't post these items to Facebook. It still works for the normal posts though.

    Is there any way I could get it to work?

  6. mtschirs
    Member
    Posted 7 months ago #

    Hi trancesetter,

    the current version supports custom post types, so it should work. But since it does not, you could try this modified version of the plugin: http://pastebin.com/vtZC8Teq

    To install, just go to Plugins->Facebook page publish->edit and replace the code in fpp_index.php with this new one.

    Does this help?

  7. trancesetter
    Member
    Posted 5 months ago #

    Thanks. That works perfectly. Now I see that there's a new version (3.9 instead of 3.9a) available, but when I update the plugin to the new version, then it does not work anymore.

    I'll stick to the old version, because that just works, but I just wanted to share it with you :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic