Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the simple-custom-post-order domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/staging.wpify.io/web/wp/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woocommerce domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/staging.wpify.io/web/wp/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woocommerce-subscriptions domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/staging.wpify.io/web/wp/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wpify-woo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/staging.wpify.io/web/wp/wp-includes/functions.php on line 6114
Ovlivnění zobrazení widgetu – WPify

Dokumentace

Ovlivnění zobrazení widgetu

Jakmile zapnete zobrazování widgetu a vložíte jeho kód v nastavení modulu, tak se widget bude zobrazovat na všech stránkách.

[basepress-notice style=“info“]Widget se na mobilním rozlišení nezobrazuje. Toto je ovlivněno podmínkou přímo v kódu widgetu na straně Heureky a není možné jej tedy ovlivnit.[/basepress-notice]

Pokud toto zobrazování chcete ovlivnit, můžete tak učinit pomocí vlastního snippeu, kterým řeknete kde se widget má nebo nemá zobrazovat.

Pro tyto účely je v modu k dispozici následující filtr, který očekává hodnoty true – zobrazit, nebo false– nezobrazit.

apply_filters( 'wpify_woo_heureka_render_widget', true )

Následující příklad omezuje zobrazení widgetu jen na stránky obchodu.

add_filter( 'wpify_woo_heureka_render_widget', function ( $render ) {
   // Pokud stránka není WooCommerce stránka - nezobrazit
   if ( ! is_woocommerce() ) {
      return false;
   }

   // jinak vrátit základní hodnotu
   return $render;
}, 10, 1 );