WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Amazon Product In a Post Plugin] Feature Suggestion – Custom Post Types

[Resolved] [Plugin: Amazon Product In a Post Plugin] Feature Suggestion – Custom Post Types

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Don Fischer

    @prophecy2040

    this will be added to a future version, but for now, you can add this to your theme functions.php file to hook into the custom post type:

    global $appipBulidBox;
    $custom_post_type = 'put-post-type-here';
    add_action('admin_menu', create_function("$appipBulidBox","if( function_exists( 'add_meta_box' ))add_meta_box( 'amazonProductInAPostBox1', __( 'Amazon Product In a Post Settings', 'appplugin' ), 'amazonProductInAPostBox1', $custom_post_type, 'normal', 'high' );"));

    Be sure to change the ‘put-post-type-here’ into your actual custom post type name.

    Regards,
    Don

    Plugin Author Don Fischer

    @prophecy2040

    Actually, you should probably throw a ‘function_exists’ conditional around that just in case you uninstall the plugin in the future – that way it will not have a fatal error.

    Like so:

    if(function_exists('amazonProductInAPostBox1')){
    	global $appipBulidBox;
    	$custom_post_type = 'put-post-type-here';
    	add_action('admin_menu', create_function("$appipBulidBox",
    "if( function_exists( 'add_meta_box' ))add_meta_box( 'amazonProductInAPostBox1',
    __( 'Amazon Product In a Post Settings', 'appplugin' ), 'amazonProductInAPostBox1', $custom_post_type, 'normal', 'high' );"));
    }

    Regards,
    Don

    Moderator cubecolour

    @numeeja

    Many thanks Don, I’ll give that a try

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: Amazon Product In a Post Plugin] Feature Suggestion – Custom Post Types’ is closed to new replies.