Wordpress plugins
Custom Posts Accordion

Custom Posts Accordion

Version : 1.0.0
Tested up to : 4.8.2
Number of download : 175
Average rating : 0 / 5 on 0 votes 0 votes, 0 avg.rating

Screenshots

Custom Posts Accordion
Custom Posts Accordion
Custom Posts Accordion
Custom Posts Accordion

This plugin creates Bootstrap accordion from custom posts. Requires Bootstrap 3.x, if your theme is not Bootstrap based you will not be able to use this plugin. Fully compatible with WPML, just translate your posts and use shortcodes as explained below. Plugin currently does not support Woocommerce. How to use To use this plugin you need custom post registerred. You may check [Post Types](https://codex.wordpress.org/Post_Types “Post Types”) to see how to do it. Example from WP Codex – for testing, copy and paste code below to theme functions.php add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'Accordion', array( 'labels' => array( 'name' => __( 'Accordions' ), 'singular_name' => __( 'Accordion' ) ), 'public' => true, 'has_archive' => true, ) ); } Add shortcode to page or post where you want to use accordion If you used code above to create custom posts type you would use following shortcode: [gw_accordion custom_post="Accordion"] Optionally, you may add CSS class [gw_accordion custom_post="Accordion" class="my_css_class"] You can also add code to your theme <?php echo do_shortcode('[gw_accordion custom_post="Accordion"');?> or with CSS class <?php echo do_shortcode('[gw_accordion custom_post="Accordion" class="my_css_class"]');?> You also may set ordering , default is by ID and Ascending (ASC) [gw_accordion custom_post=”Accordion” class=”my_css_class” order_by=”title” order=”asc”] Demo Check Demo (http://geniusworks.xyz/plugins/custom-posts-accordion/) Known Issues If your theme use smooth scroll script like this one jQuery(function() { jQuery('a[href*="#"]:not([href="#"]').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = jQuery(this.hash); target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']'); if (target.length) { jQuery('html,body').animate({ scrollTop: target.offset().top }, 2000); return false; } } }); }); You may need to change this line jQuery('a[href*="#"]:not([href="#"]') To look like this jQuery('a[href*="#"]:not([href="#"], a:not([data-toggle])') to avoid conflict

Download now