wp_enqueue_scripts

In a link element ids WP add -css, so you need to remove it. May be this will help: function remove_font_awesome() { wp_dequeue_style(‘geowidget-4.5-css’); // not geowidget-4.5-css-css } add_action (‘wp_enqueue_scripts’, ‘remove_font_awesome’, 9999); add_action( ‘wp_head’, ‘remove_font_awesome’, 9999 );

Create custom function for hero image

get_the_title() returns the post (product) title including all HTML, whitespaces and symbols not allowed in URLs, etc. Use post slug instead. Also, you don’t need to use any actions. function custom_hero_image( $post_id ) { $product = get_post( $post_id ); $slug = $product->post_name; if ( is_product( $post_id ) ) { $html=”<img class=”jarallax-img” src=””. get_template_directory_uri() .’/inc/assets/img/shop/hero/’.$slug.’.jpg”>’; } … Read more

How to change WooCommerce loop product title HTML output in single product page and archive page

The main problems with what you’ve got are tha your close bracket } for the is_product() case is in the wrong place: it should be before the elseif not at the bottom of the block. (This is what Tom meant by indenting your code correctly: if you’d indented each {…}, which your IDE will do … Read more

How to add PHP code in functions.php wordpress

Perhaps this is what you mean? <?php //Insert ads after second paragraph of single post content. add_filter( ‘the_content’, ‘prefix_insert_post_ads’ ); function prefix_insert_post_ads( $content ) { $ad_code=”<div>”.sewp_381661_get_advert().'</div>’; if ( is_single() && ! is_admin() ) { return prefix_insert_after_paragraph( $ad_code, 2, $content ); } return $content; } // function to return ad markup / logic ## function sewp_381661_get_advert(){ … Read more

custom functions in function file delete automatically daily

The simplest advice is that you should never edit what are generally know as Core WordPress files, that includes adding new files within the wp-includes and wp-admin directories. The simple reason why this is not a good idea is that they are replaced when WordPres updates – deleting any changes or additional files – which … Read more