Show number of sold products but be first for less than 2

OK, so if anyone else is looking for the answer for this I figured it out after a bit more sleep. I had to get rid of the return and the second function. So the code now looks like this add_action( ‘woocommerce_single_product_summary’, ‘my_units_sold_counts’, 19 ); function my_units_sold_counts($units_sold) { global $product; $units_sold = get_post_meta( $product->id, ‘total_sales’, … Read more

WordPress reading old version of functions.php, breaks site

The issue was indeed server side caching. Bluehost was very helpful in providing a way to fix it via FTP. Do the following: In the /wp-content/mu-plugins directory, there is a file called endurance-browser-cache.php. By renaming the file, for example to endurance-browser-cache.old, visiting the site, and returning the name to endurance-browser-cache.php, WordPress will have had to … Read more

Graphic before title – Specific Category

Try the following code: function new_title( $title ) { if(in_the_loop() && !is_singular(‘page’)) { $picArray = array( ‘3’ => ‘⚠’, ‘5’ => ‘⛅’, ); $cats = get_the_category(); $cat = $cats[0]->term_id; $title = $picArray[$cat] . ‘ ‘ . $title; } return $title; } add_filter( ‘the_title’, ‘new_title’ ); First, we check if we are in the loop, and … Read more

Will dequeueing in child theme functions.php file prevent Google Fonts from loading?

Dequeueing the enqueued style will be sufficient. But you need to be careful to dequeue it after it is enqueued. It is enqueued at the default priority of 10, so make sure that when you hook into wp_enqueue_scripts you do so at a higher/later priority. add_action( ‘wp_enqueue_scripts’, ‘wpse_escutcheon_scripts’, 11 ); function wpse_escutcheon_scripts() { wp_dequeue_style( ‘escutcheon-fonts’ … Read more