• Resolved bisrandom

    (@bisrandom)


    Hi,

    I’ve created a custom post type ‘events’ which is really just like a normal post type, but also adding custom field, date.

    I have added the meta box to the event post type form (see below), however I can’t get the events posts to actually show up on the facebook page. Normal posts are showing up fine.

    Any advice?

    Thanks,
    Brooke

    function wpbook_lite_add_meta_box() {
      global $wp_version;
      if (version_compare($wp_version, '2.7', '>=')) {
        add_meta_box('wpbook_lite_post_form','WPBook-Lite', 'wpbook_lite_meta_box', 'post', 'side');
      } else {
        add_meta_box('wpbook_lite_post_form','WPBook-Lite', 'wpbook_lite_meta_box', 'post', 'normal');
      }
    
      if (version_compare($wp_version, '2.7', '>=')) {
        add_meta_box('wpbook_lite_post_form','WPBook-Lite', 'wpbook_lite_meta_box', 'events', 'side');
      } else {
        add_meta_box('wpbook_lite_post_form','WPBook-Lite', 'wpbook_lite_meta_box', 'events', 'normal');
      }
    }

    [Please post code or markup snippets between backticks or use the code button.]

    https://www.ads-software.com/extend/plugins/wpbook-lite/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Eckman

    (@johneckman)

    @bisrandom – by default WPBook and WPBook Lite are both set to ignore non ‘post’ type posts.

    In the case of WPBook Lite you can change this by editing the plugin.

    In wpbook-lite\includes\publish_to_facebook.php, look at lines 71-73:

    if(get_post_type($my_post->ID) != 'post') { // only do this for posts
    			return;
    		}

    You’ll need to change this if statement to something like this (which says if the post is not a ‘post’ AND is not an ‘event’):

    if(get_post_type($my_post->ID) ! = 'post' && get_post_type(my_post->iD) != 'event')

    or just comment out all three lines to get all post types.

    Thread Starter bisrandom

    (@bisrandom)

    @johneckman Many thanks! I will try this out now ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘using WPBook Lite and custom post type Events’ is closed to new replies.