【发布时间】:2015-10-02 09:57:13
【问题描述】:
这是我想在搜索结果页面中禁用的插件代码。 它会影响我的结果并以一种奇怪的方式显示它们。所以我想在这个页面中禁用它。在这里。
class WC_PSAD
{
public function WC_PSAD() {
$this->init();
}
public function init () {
add_filter('loop_shop_per_page', array( $this, 'limit_posts_per_page'),99);
//Fix Responsi Theme.
add_action( 'a3rev_head', array( $this, 'remove_responsi_action'), 11 );
add_action( 'woo_head', array( $this, 'remove_responsi_action'), 11 );
add_action( 'wp_head', array( $this, 'remove_woocommerce_pagination'), 10 );
add_action( 'woocommerce_after_shop_loop', array( $this, 'woocommerce_pagination') );
//Check if shop page
add_action( 'woocommerce_before_shop_loop', array( $this, 'check_shop_page'), 1 );
// For Shop page
add_action( 'woocommerce_before_shop_loop', array( $this, 'start_remove_orderby_shop'), 2 );
add_action( 'woocommerce_before_shop_loop', array( $this, 'end_remove_orderby_shop'), 40 );
add_action( 'woocommerce_before_shop_loop', array( $this, 'dont_show_product_on_shop'), 41 );
add_action( 'woocommerce_after_shop_loop', array( $this, 'rewrite_shop_page'), 12 );
我只想为搜索结果页面删除这 4 个操作“FOR SHOP PAGE”。 请问我该怎么做?
编辑:编辑:我所要做的就是检查参数 url:
public function WC_PSAD() {
if(!isset($_GET["s"]) ){
$this->init(); }
}
感谢您的回答!
【问题讨论】: