WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Add Link to Facebook] Not working for Custom Post Types (16 posts)

  1. Vinoth Kannan
    Member
    Posted 3 years ago #

    Hi,

    Am now using the plugin "Add Link to Facebook" to publish my posts in facebook. Its working fine. Actually i love this plugin. But its not working for custom post types. Anyone can suggest me to solve the problem?

    Plugin Url :- http://wordpress.org/extend/plugins/add-link-to-facebook/

  2. Marcel Bokhorst
    Member
    Posted 3 years ago #

    I will look into this, but you have to have some patience, because some other features are before it in the pipeline :-)

  3. Vinoth Kannan
    Member
    Posted 3 years ago #

    Thanks for your quick response. I will wait for your plugin to support custom post type. Please do it as soon as possible. :)

  4. Marcel Bokhorst
    Member
    Posted 3 years ago #

    Actually it is working, but you should enable support for custom fields for the custom post type.

  5. ovidiubica
    Member
    Posted 3 years ago #

    For some reason it doesn't work for me. And I do have custom fields type enabled. I'm using the classipress ads theme. Any ideea why?
    Could have something to do with the theme's coding?

    Here's the custom post type registration:

    register_post_type( 'ad_listing',
            array( 'labels' => array(
                'name' => __( 'Ads', 'appthemes' ),
                'singular_name' => __( 'Ad', 'appthemes' ),
                'add_new' => __( 'Add New', 'appthemes' ),
                'add_new_item' => __( 'Create New Ad', 'appthemes' ),
                'edit' => __( 'Edit', 'appthemes' ),
                'edit_item' => __( 'Edit Ad', 'appthemes' ),
                'new_item' => __( 'New Ad', 'appthemes' ),
                'view' => __( 'View Ads', 'appthemes' ),
                'view_item' => __( 'View Ad', 'appthemes' ),
                'search_items' => __( 'Search Ads', 'appthemes' ),
                'not_found' => __( 'No ads found', 'appthemes' ),
                'not_found_in_trash' => __( 'No ads found in trash', 'appthemes' ),
                'parent' => __( 'Parent Ad', 'appthemes' ),
                ),
                'description' => __( 'This is where you can create new classified ads on your site.', 'appthemes' ),
                'public' => true,
                'show_ui' => true,
                'capability_type' => 'post',
                'publicly_queryable' => true,
                'exclude_from_search' => false,
                'menu_position' => 8,
                'menu_icon' => FAVICON,
                'hierarchical' => false,
                'rewrite' => array( 'slug' => $post_type_base_url, 'with_front' => false ),
                'query_var' => true,
                'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'sticky' ),
                )
    );

    I also have custom taxonomies for categories and tags.

  6. Marcel Bokhorst
    Member
    Posted 3 years ago #

    I see custom fields are supported by the custom post type, so that is not the problem. It could be that your theme causes no or incorrect execution of the action transition_post_status, which is the trigger for the Add Link to Facebook plugin to add a link to Facebook. Maybe the simplest is to ask the theme developer about this.

  7. ovidiubica
    Member
    Posted 3 years ago #

    You're right, I don't see any reference to that hook in the theme. And posting from WordPress core form works for custom post types.

    The theme uses custom form to post ads from the front-end. Any ideea how I should call this in theme functions?

    Thanks,
    Ovidiu

  8. Marcel Bokhorst
    Member
    Posted 3 years ago #

    I think the problem is slightly different: the theme probably prevents calling the action transition_post_status from the WordPress core by creating posts in its own way. Since more themes/plugins have this problem, I will create a custom action that can be called in these cases. I will report back when the action is there (probably tonight CET).

  9. ovidiubica
    Member
    Posted 3 years ago #

    That's great, you can have a look at WP-to-Twitter plugin by joedolson, that plugin worked out of the box for me.

    Take care!

  10. Marcel Bokhorst
    Member
    Posted 3 years ago #

    I may have found a workaround in the plugin for this problem. Could you please upgrade to at least version 0.60 and let me know if it works in your case or not? This version also supports a custom action al2fb_publish, which can be used as workaround for these cases.

  11. ovidiubica
    Member
    Posted 3 years ago #

    I upgraded but it still doesn't work.
    It only works if I add it from the backend and even then it doesn't use the picture in the post. It shows a WP blue logo.
    Anything else I should try?

  12. Marcel Bokhorst
    Member
    Posted 3 years ago #

    Yes, I would be grateful if you try to insert the following at line 153 of add-link-to-facebook-class.php:

    add_action('publish_post', array(&$this, 'Remote_publish'));

    About the picture: what picture option did you select in the settings?

  13. ovidiubica
    Member
    Posted 3 years ago #

    Doesn't work.
    As for the image, I use "first image from the post".
    Give me an email and I'll set you up with some details to poke around.

  14. Marcel Bokhorst
    Member
    Posted 3 years ago #

    Thank you. You can send the login details using the contact from. I will look into this tonight (CET).

  15. scott74
    Member
    Posted 2 years ago #

    Hi, I am having problems getting this plugin to display the correct link when someone post on my site using a form... I am using gravity forms for a client who is allowing people to post pics of there yard for a yard of the month contest (lawncare company)

    When you post using Gravity Forms It uses the post url instead of using the post title (hyperlinked) when displaying on facebook wall.. It also then strips pout part of the url so when you click on it from facebook you go to an error 404 page.

    Is there something I can do to make this work.. Really like all the features of the plugin but need it to work with posting from front end with gravity forms

    Other plugins I tried to post correctly but the double post , once correct with post tiltle and one post under it with stripped out link like this one

    this is a screen shot of what the links looks like.. may have been other plugins but same premise... http://imm.io/f0N4

    Thanks Scott..

    ps.. Using Karma Theme form thememforest

  16. Marcel Bokhorst
    Member
    Posted 2 years ago #

    Go here.

    Please do not use discussions of others, especially if it is more than 10 months old. They get notified of your replies.

Topic Closed

This topic has been closed to new replies.

About this Topic