Categories

Sunday, May 22, 2022
therichposts@gmail.com
Woocommerce Hooks

How to add banner image woocommerce shop page with hook?

How to add download pdf link in woocommerce single product page?

Add banner image woocommerce shop page with hook

Hello to all, welcome to therichpost.com. In this post, I will tell you, How to add banner image woocommerce shop page with hook?

I am sharing two hooks and both are working.

Here is the working code for How to add banner image woocommerce shop page with hook? and you need to add this code into your theme’s functions.php file:
add_action ('woocommerce_archive_description' , 'shop_banner',99);
 function shop_banner() {
   echo  '<img src="{YOUR_IMAGE_PATH}" >';
  }
function BannerShop(){

  if(is_shop()){
    echo '<img src="your_image_path" >';
  }
}
add_action( 'woocommerce_before_main_content', 'BannerShop', 10 );

If you have any query related to this post, then please do comment or email me.

 

therichpost
the authortherichpost
Hello to all. Welcome to therichpost.com. Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know WordPress, Core php, Angularjs, Angular 7, Angular 8, Angular 9, Angular 10, Angular 11, Angular12, Angular 13, Angular 14, Bootstrap 5, Nodejs, Laravel, Codeigniter, Shopify, Squarespace, jQuery, Google Map Api, Vuejs, Reactjs, Big commerce etc.

2 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.