How to get rid of the hover zoom in WooCommerce single products

This is possible using woocommerce_single_product_zoom_enabled dedicated filter hook: add_filter( ‘woocommerce_single_product_zoom_enabled’, ‘__return_false’ ); Code goes in functions.php file of your active child theme (or active theme). Tested and work. It is possible using woocommerce_single_product_zoom_enabled dedicated filter hook. The hook undocumented available parameters in the options array are: $zoom_options = array ( ‘url’ => false, ‘callback’ => … Read more

WordPress Admin Tooltip hooks

Here is the simplest implementation I know of since there is no real API: //add the needed scripts and styles add_action(‘admin_enqueue_scripts’, ‘wpse_46028_enqueue_admin_scripts’); function wpse_46028_enqueue_admin_scripts() { wp_enqueue_style(‘wp-pointer’); wp_enqueue_script(‘wp-pointer’); //hook the pointer add_action(‘admin_print_footer_scripts’, ‘wpse_46028_print_footer_scripts’ ); } function wpse_46028_print_footer_scripts() { $pointer_content=”<h3>WordPress Answers</h3>”; $pointer_content .= ‘<p>This is your pointer content</p>’; ?> <script type=”text/javascript”> //<![CDATA[ jQuery(document).ready( function($) { //jQuery selector … Read more

the_content and wp_link_pages

I guess you have: the_content(); wp_link_pages(); in your theme file. So you can instead try the following (PHP 5.4+): /** * Append the wp_link_pages to the content. */ ! is_admin() && add_filter( ‘the_content’, function( $content ) { if( in_the_loop() ) { $args = [ ‘echo’ => false ]; // <– Adjust the arguments to your … Read more

Disable block from editor based on post type

You can use the allowed_block_types hook: <?php function wpse_allowed_block_types($allowed_block_types, $post) { // Limit blocks in ‘post’ post type if($post->post_type == ‘post’) { // Return an array containing the allowed block types return array( ‘core/paragraph’, ‘core/heading’ ); } // Limit blocks in ‘page’ post type elseif($post->post_type == ‘page’) { return array( ‘core/list’ ); } // Allow … Read more

apply_filters() slices away needed arguments

Two inherent problems with your script as posted. I’m not certain this will solve your problem, but it’s too big to address in the comments. First, you need to use add_action(), not add_filter(). That by itself is not a huge deal because add_action() is just a wrapper for add_filter(), but you should still use the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)