__('Accordions', 'accordions'), 'singular_name' => __('Accordions', 'accordions'), 'add_new' => __('New Accordions', 'accordions'), 'add_new_item' => __('New Accordions'), 'edit_item' => __('Edit Accordions'), 'new_item' => __('New Accordions'), 'view_item' => __('View Accordions'), 'search_items' => __('Search Accordions'), 'not_found' => __('Nothing found'), 'not_found_in_trash' => __('Nothing found in Trash'), 'parent_item_colon' => '' ); $args = array( 'labels' => $labels, 'public' => false, 'publicly_queryable' => false, 'show_ui' => true, 'query_var' => true, 'menu_icon' => null, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title'), 'menu_icon' => 'dashicons-editor-justify', ); register_post_type( 'accordions' , $args ); } add_action('init', 'accordions_posttype_register'); /** * Adds a box to the main column on the Post and Page edit screens. */ function meta_boxes_accordions(){ $screens = array( 'accordions' ); foreach ( $screens as $screen ){ add_meta_box('accordions_metabox',__( 'Accordions Options', 'accordions' ),'meta_boxes_accordions_input', $screen); add_meta_box('accordions_side_metabox',__( 'Accordions Info', 'accordions' ),'meta_boxes_accordions_side', $screen,'side'); } add_meta_box('accordions_product_metabox',__( 'Product FAQ Tab', 'accordions' ),'meta_boxes_accordions_product_input', 'product', 'side', 'high'); } add_action( 'add_meta_boxes', 'meta_boxes_accordions' ); function meta_boxes_accordions_product_input( $post ) { global $post; wp_nonce_field( 'meta_boxes_accordions_wc_input', 'meta_boxes_accordions_wc_input_nonce' ); $accordions_id = get_post_meta( $post->ID, 'accordions_id', true ); $accordions_tab_title = get_post_meta( $post->ID, 'accordions_tab_title', true ); //var_dump($accordions_id); ?>

'shortcode', 'title' => __('Shortcode','accordions'), 'priority' => 1, 'active' => true, ); $accordion_settings_tab[] = array( 'id' => 'options', 'title' => __('Options','accordions'), 'priority' => 2, 'active' => false, ); $accordion_settings_tab[] = array( 'id' => 'style', 'title' => __('Style','accordions'), 'priority' => 3, 'active' => false, ); $accordion_settings_tab[] = array( 'id' => 'content', 'title' => __('Content','accordions'), 'priority' => 4, 'active' => false, ); $accordion_settings_tab[] = array( 'id' => 'custom_scripts', 'title' => __('Custom Scripts','accordions'), 'priority' => 6, 'active' => false, ); $accordion_settings_tabs = apply_filters('accordion_settings_tabs', $accordion_settings_tab); $tabs_sorted = array(); foreach ($accordion_settings_tabs as $page_key => $tab) $tabs_sorted[$page_key] = isset( $tab['priority'] ) ? $tab['priority'] : 0; array_multisort($tabs_sorted, SORT_ASC, $accordion_settings_tabs); $post_id = $post->ID; ?>

post_type=='product' && in_array( 'woocommerce/woocommerce.php', (array) $active_plugins ) ){ /* * We need to verify this came from the our screen and with proper authorization, * because save_post can be triggered at other times. */ // Check if our nonce is set. if ( ! isset( $_POST['meta_boxes_accordions_wc_input_nonce'] ) ) return $post_id; $nonce = $_POST['meta_boxes_accordions_wc_input_nonce']; // Verify that the nonce is valid. if ( ! wp_verify_nonce( $nonce, 'meta_boxes_accordions_wc_input' ) ) return $post_id; // If this is an autosave, our form has not been submitted, so we don't want to do anything. if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return $post_id; /* OK, its safe for us to save the data now. */ // Sanitize user input. $accordions_id = sanitize_text_field( $_POST['accordions_id'] ); $accordions_tab_title = sanitize_text_field( $_POST['accordions_tab_title'] ); update_post_meta( $post_id, 'accordions_id', $accordions_id ); update_post_meta( $post_id, 'accordions_tab_title', $accordions_tab_title ); } } add_action( 'save_post', 'meta_boxes_accordions_product_save' ); function meta_boxes_accordions_side( $post ) { $class_accordions_support = new class_accordions_support(); ?>

Try Premium

Buy Premium

We added some exclusive feature in premium version, you may try our pro version if you need.

Documentation

Documentation

Before asking, submitting reviews please take a look on our documentation, may help your issue fast.

Looking for support?

Ask Question

Its free and you can ask any question about our plugins and get support fast.

Provide your feedback

Submit Reviews Ask wordpress.org

We spent thousand+ hours to development on this plugin, please submit your reviews wisely.

If you have any issue with this plugin please submit our forums or contact our support first.

Your feedback and reviews are most important things to keep our development on track. If you have time please submit us five star reviews.

faq(); if(!empty($video_tutorials)): ?>

FAQ

Some feature may avilable in premium version, you will need to buy pro version and install first.

video_tutorials(); if(!empty($video_tutorials)): ?>

Video Tutorials

Some feature may avilable in premium version, you will need to buy pro version and install first. we used premium version to create video tutorials.