What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-11-11 16:19:23
wp_localize_script
<?php function pw_load_scripts() { wp_enqueue_script('pw-script', plugin_dir_url( __FILE__ ) . 'js/pw-script.js'); wp_localize_script('pw-script', 'pw_script_vars', array( 'alert' => __('Hey! You have clicked the button!', 'pippin') ) ... Add solution -
PHP 2021-11-11 05:17:31
dequeue dashicons
// INSIDE YOUR THEME FUNCIONS.PHP FILE -> function wpdocs_dequeue_dashicon() { wp_deregister_style('dashicons'); } add_action( 'wp_enqueue_scripts', 'wpdocs_dequeue_dashicon' ); // OR remove dashicons in frontend to non-admin function wpdocs_dequeu... Add solution -
Other 2021-11-11 04:49:11
add view cart button after added to cart on single ppage
add_action('wp_footer','custom_jquery_add_to_cart_script'); function custom_jquery_add_to_cart_script(){ if ( is_shop() || is_product_category() || is_product_tag() ): // Only for archives pages ?> <script type="text/jav... Add solution -
Other 2021-11-10 22:54:19
woocommerce combine account details and addresses
/** * @snippet Merge Two "My Account" Tabs @ WooCommerce Account * @how-to Get CustomizeWoo.com FREE * @source &nb... Add solution -
PHP 2021-11-08 19:57:09
woocommerce_customer_save_address
// define the woocommerce_customer_save_address callback function action_woocommerce_customer_save_address( $user_id, $load_address ) { // make action magic happen here... }; // add the action add_action( 'woocom... Add solution -
PHP 2021-11-08 07:23:10
how to add script in WordPress admin page
/** * Enqueue a script in the WordPress admin on edit.php. * * @param int $hook Hook suffix for the current admin page. */ function wpdocs_selectively_enqueue_admin_script( $hook ) { if ( 'edit.php' != $hook... Add solution -
CSS 2021-11-07 15:22:11
should you disable embed scripts in wordpress
function disable_embeds_code_init() { // Remove the REST API endpoint. remove_action( 'rest_api_init', 'wp_oembed_register_route' ); // Turn off oEmbed auto discovery. add_filter( 'embed_oembed_discover', '__return_false' ); // Don't filter oEmbed... Add solution -
PHP 2021-11-07 06:19:13
wp_enqueue_script
function wpdocs_theme_name_scripts() { wp_enqueue_style( 'style-name', get_stylesheet_uri() ); /* enqueues style.css */ /* if you want to enqueue other styles use: */ /* wp_enqueue_style( 'style-name', get_template_directory_uri() . '/css/your... Add solution
Best helpers
Ranking is empty