Skip to content

Instantly share code, notes, and snippets.

@IamSohaggazi
Last active May 25, 2019 07:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IamSohaggazi/e70add07a2cc8d75d0e15360d97e2c7e to your computer and use it in GitHub Desktop.
Save IamSohaggazi/e70add07a2cc8d75d0e15360d97e2c7e to your computer and use it in GitHub Desktop.
//** capie Woocommerce Theme Options Panel **//
// show all sale in onepage
$cmb = show_all_shop_items( array(
'id' => 'show_top_items',
'title' => 'Best Sellar Center',
'object_types' => array( 'page' ), // post type
'show_on' => array( 'data_post_say_intro' => 'id', 'value' => array( 50, 24 ) ),
'context' => 'normal', // 'normal', 'advanced', or 'side'
'priority' => 'high', // 'high', 'core', 'default' or 'low'
'show_names' => true, // Show field names on the left
) );
// show all sale in same page with post argoment
$cmb = new_cmb2_box( array(
'id' => 'best_seller',
'title' => 'bast intro best sale',
'object_types' => array( 'page' ), // post type
'show_on' => array( 'key' => 'page-template', 'value' => 'bestsaler-items.php' ),
'context' => 'normal', // 'normal', 'advanced', or 'side'
'priority' => 'high', // 'high', 'core', 'default' or 'low'
'show_names' => true, // Show field names on the left
) );
// show all featured sale item
$cmb = new_cmb2_box( array(
'id' => 'featured_sale_item_show',
'title' => 'Featured Item Sale Show',
'object_types' => array( 'page' ), // post type
'show_on' => array( 'key' => 'page-template', 'value' => 'featured_sale_store.php' ),
'context' => 'normal', // 'normal', 'advanced', or 'side'
'priority' => 'high', // 'high', 'core', 'default' or 'low'
'show_names' => true, // Show field names on the left
) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment