Customizing the wp_video_shortcode output with add_filter
Customizing the wp_video_shortcode output with add_filter
Customizing the wp_video_shortcode output with add_filter
After talking with some of the WooCommerce people on Slack, I realized that the problem here is probably this pattern, in frontend/cart.js – due to the fact, that my store uses the AJAX functionality that WooCommerce provides. var show_notice = function( html_element, $target ) { if ( ! $target ) { $target = $( ‘.woocommerce-notices-wrapper:first’ … Read more
I use this on archive pages. If you are trying to use it elsewhere then that might be a cause of the issue. if ( ! function_exists( ‘_s_pagination_links’ ) ) : /** * Numbered pagination */ function _s_pagination_links() { global $wp_query; $total_pages = $wp_query->max_num_pages; if ($total_pages > 1){ $current_page = max(1, get_query_var(‘paged’)); echo paginate_links(array( ‘base’ … Read more
You will need to dequeue it after it has been enqueued. function wpse387889_dequeue_scripts() { wp_dequeue_script(‘jquery-tinycolor’); wp_deregister_script(‘jquery-tinycolor’); wp_dequeue_script(‘splittext’); wp_deregister_script(‘splittext’); } add_action( ‘wp_enqueue_scripts’, ‘wpse387889_dequeue_scripts’, 99 );
Only the first image uploads
You are populating the $term variable with a multidimensional array, but type-and-value checking it (===) against a string. Second, you say terms are ‘des_1’ and ‘des_1’ (with underscore), but are checking for ‘des-1’ (with dash). wp_get_post_terms will return an array of term objects, so you should might be better of with has_term() for checking if … Read more
You can achieve it with pre_get_posts. With your current code there are multiple syntax errors. You have write it this way add_filter(‘pre_get_posts’, ‘limit_change_posts_archive’); function limit_change_posts_archive($query){ if ( !is_admin() && $query->is_main_query() && is_archive() && is_tax( ‘pdsh_categories’ ) && is_term( 1858 )) { $query->set(‘posts_per_page’, -1); } return $query; } As is_term is deprecated a different approach can … Read more
I didn’t see this happening on your site, but I think you could probably remove the variable declaration in front of setcookie(). I didn’t see result called used any where in this code. Which makes me wonder if the value is being set because since the variable isn’t used. <?php add_filter( ‘init’, ‘aws_set_language_cookie’, 999 ); … Read more
How to copy the all WordPress media items to another custom plugin folder?
Render metabox gallery in frontend