Title: disable when using shortcodes
Last modified: August 21, 2016

---

# disable when using shortcodes

 *  Resolved [jon182](https://wordpress.org/support/users/brody182/)
 * (@brody182)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/disable-when-using-shortcodes/)
 * HOw do i disable the list view when using jigoshop short code [product_ids] ?
 * [http://wordpress.org/plugins/jigoshop-list-view/](http://wordpress.org/plugins/jigoshop-list-view/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [chriscct7](https://wordpress.org/support/users/chriscct7/)
 * (@chriscct7)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/disable-when-using-shortcodes/#post-4119293)
 * Hi there,
    Assuming you’re running WP 3.6 or newer, you could make a function
   to check for the existance of that shortcode using has_shortcode() to remove 
   these actions:
 *     ```
       add_action( 'get_header', array(&$this, 'setup_scripts_styles'), 20);
       add_action( 'jigoshop_before_shop_loop', array(&$this, 'gridlist_toggle_button'), 20);
       add_action( 'jigoshop_after_shop_loop_item', array(&$this,'jigoshop_template_single_excerpt'), 11);
       add_action( 'jigoshop_after_shop_loop_item', array(&$this, 'gridlist_buttonwrap_close'), 7);
       add_action( 'jigoshop_after_shop_loop_item', array(&$this, 'gridlist_hr'), 30);
       ```
   
 * something like (and this isn’t tested and probably won’t work as written):
 *     ```
       add_action('plugins_loaded','remove_list_view');
       function remove_list_view(){
       global $post;
       if( has_shortcode( $post->post_content, 'product_ids') ) {
       		remove_action( 'get_header', array(&$this, 'setup_scripts_styles'), 20);
       remove_action( 'jigoshop_before_shop_loop', array(&$this, 'gridlist_toggle_button'), 20);
       remove_action( 'jigoshop_after_shop_loop_item', array(&$this,'jigoshop_template_single_excerpt'), 11);
       remove_action( 'jigoshop_after_shop_loop_item', array(&$this, 'gridlist_buttonwrap_close'), 7);
       remove_action( 'jigoshop_after_shop_loop_item', array(&$this, 'gridlist_hr'), 30);
       }
       }
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘disable when using shortcodes’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/jigoshop-list-view.svg)
 * [Jigoshop List View](https://wordpress.org/plugins/jigoshop-list-view/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jigoshop-list-view/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jigoshop-list-view/)
 * [Active Topics](https://wordpress.org/support/plugin/jigoshop-list-view/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jigoshop-list-view/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jigoshop-list-view/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [chriscct7](https://wordpress.org/support/users/chriscct7/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/disable-when-using-shortcodes/#post-4119293)
 * Status: resolved