Title: It doesn&#8217;t show
Last modified: June 4, 2020

---

# It doesn’t show

 *  Resolved [Lukas Godoy](https://wordpress.org/support/users/lukasgodoy/)
 * (@lukasgodoy)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/)
 * I setup banner in category page but it doesn’t show in the page. Can I set a 
   code in the category page?

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/it-doesnt-show-2/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/it-doesnt-show-2/page/2/?output_format=md)

 *  Plugin Author [Dotstore](https://wordpress.org/support/users/dots/)
 * (@dots)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/#post-12943268)
 * Hello lukasgodoy,
 * Thanks for reaching out to us.
 * Actually, our plugin category banner is working based on the hook given below.`"
   woocommerce_before_main_content"`
 * So, if your current theme does not contains the above hook then, you need to 
   add that hook on your theme file location in which you want to show the banner.
 * Please add hook like below.
 * `do_action('woocommerce_before_main_content');`
 * Let me know still if any.
 * Thanks,
 *  [MacMorre](https://wordpress.org/support/users/macmorre/)
 * (@macmorre)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/#post-12961661)
 * Hello,
    please can you explain me “to add that hook on your theme file location
   in which you want to show the banner” how to do? Thank you Chris
 *  Thread Starter [Lukas Godoy](https://wordpress.org/support/users/lukasgodoy/)
 * (@lukasgodoy)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/#post-12961799)
 * Should I insert this in the archive page?
 *  Plugin Author [Dotstore](https://wordpress.org/support/users/dots/)
 * (@dots)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/#post-12963489)
 * Hello lukasgodoy, macmorre,
 * Thanks for reaching out to us.
 * Actually, `do_action('woocommerce_before_main_content');` this is the code which
   will insert the banner html once you call it.
 * So, yes you can add that action(line) in archive page or header.php file based
   on your layout requirement.
 * For eg. if you want to display the banner after the navigation menu then, you
   need to add this line after the nav tag.
 * **Like:**
    <nav>
    - Home
    - Shop
 * </nav>
 * So, after this ‘</nav>’ tag you can add our line of code like below.
 *     ```
       <?php
       echo do_action('woocommerce_before_main_content');
       ?>
       ```
   
 * So, it will display the banner after that nav menu.
 * I hope this clear now. Let us know still if any.
 * Thanks,
 *  [MacMorre](https://wordpress.org/support/users/macmorre/)
 * (@macmorre)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/#post-12963591)
 * Hello,
    thank you very much for your answer. It works, but the banner is displayed
   across the entire width of the page. Is it possible to limit this to the shop
   width only?
 * Thx Chris
 *  Thread Starter [Lukas Godoy](https://wordpress.org/support/users/lukasgodoy/)
 * (@lukasgodoy)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/#post-12965171)
 * It works, [@dots](https://wordpress.org/support/users/dots/). Thanks!
 *  [MacMorre](https://wordpress.org/support/users/macmorre/)
 * (@macmorre)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/#post-12965179)
 * Hello Lukas,
    can you define the width of the banner. In which php-file did you
   enter the hook? Thx Chris
 *  Thread Starter [Lukas Godoy](https://wordpress.org/support/users/lukasgodoy/)
 * (@lukasgodoy)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/#post-12965190)
 * [@macmorre](https://wordpress.org/support/users/macmorre/) I define the width
   of the banner with custom css, like this:
 * .wbm_banner_image {
    width: 1160px; margin: auto; }
 * “Margin: auto” will center the bannner.
 *  [MacMorre](https://wordpress.org/support/users/macmorre/)
 * (@macmorre)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/#post-12965222)
 * Hello Lukas,
    thank you very much. I placed the hook on the header.php, is this
   correct? Now I have a lot of space between banner and shop.
 * I set padding: 20px; to have distance between page title and banner.
 * Best regards
    Christoph
 *  Thread Starter [Lukas Godoy](https://wordpress.org/support/users/lukasgodoy/)
 * (@lukasgodoy)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/#post-12965237)
 * [@macmorre](https://wordpress.org/support/users/macmorre/) I set the hook in 
   archive page, because I want to show in Woocommerce categories. You can use the
   inspector in the browser to correct the space between banner and the rest of 
   the content.
 *  [MacMorre](https://wordpress.org/support/users/macmorre/)
 * (@macmorre)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/#post-12965278)
 * Thank you so much!!!
    Best regards from Austria Chris
 *  [MacMorre](https://wordpress.org/support/users/macmorre/)
 * (@macmorre)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/#post-12965391)
 * Hello Lukas,
    do you also habe a solution for mobile version? Thx Chris
 *  Plugin Author [Dotstore](https://wordpress.org/support/users/dots/)
 * (@dots)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/#post-12987024)
 * Hello macmorre,
 * Thanks for your query.
 * For the mobile version, you need to manage the CSS based on your current them
   layout.
 * If you are using the default woocommmerce theme like “twentysixteen” then, it
   will auto adjust the responsive of banner in mobile version.
 * If you are using custom theme then, you need to manage it by adding the media
   CSS.
 * I hope this helps. Let us know still if any.
 * Thanks,
    Support team
 *  Thread Starter [Lukas Godoy](https://wordpress.org/support/users/lukasgodoy/)
 * (@lukasgodoy)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/#post-13009466)
 * Hi, [@dots](https://wordpress.org/support/users/dots/)!
 * Is this correct?
 * get_header( ‘shop’ ); ?>
 * <?php
    /** * woocommerce_before_main_content hook * * [@hooked](https://wordpress.org/support/users/hooked/)
   woocommerce_output_content_wrapper – 10 (outputs opening divs for the content)*
   [@hooked](https://wordpress.org/support/users/hooked/) woocommerce_breadcrumb–
   20 */
 *  woocommerce_breadcrumb();
    woocommerce_output_content_wrapper(); woocommerce_before_main_content();
 *  ?>
 *  Plugin Author [Dotstore](https://wordpress.org/support/users/dots/)
 * (@dots)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/#post-13018714)
 * Hello lukasgodoy,
 * Thanks for your reply.
 * You can add like below.
 * get_header( ‘shop’ ); ?>
 * <?php
    /** * woocommerce_before_main_content hook * * [@hooked](https://wordpress.org/support/users/hooked/)
   woocommerce_output_content_wrapper – 10 (outputs opening divs for the content)*
   [@hooked](https://wordpress.org/support/users/hooked/) woocommerce_breadcrumb–
   20 */ **echo do_action(‘woocommerce_before_main_content’);** woocommerce_breadcrumb();
   woocommerce_output_content_wrapper(); woocommerce_before_main_content ();
 * ?>
 * As you can see in above code that I have just added one line which you can add
   any place to display the banner.
 * For ex. If you want banner after the woocommerce_breadcrumb() this function then
   add that one live after that function and so on.
 * I hope this helps.
 * Thanks,

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/it-doesnt-show-2/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/it-doesnt-show-2/page/2/?output_format=md)

The topic ‘It doesn’t show’ is closed to new replies.

 * ![](https://ps.w.org/banner-management-for-woocommerce/assets/icon-256x256.png?
   rev=3011322)
 * [Banner Management, Product Slider, Product Carousel for WooCommerce](https://wordpress.org/plugins/banner-management-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/banner-management-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/banner-management-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/banner-management-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/banner-management-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/banner-management-for-woocommerce/reviews/)

## Tags

 * [banner](https://wordpress.org/support/topic-tag/banner/)
 * [Woocommer](https://wordpress.org/support/topic-tag/woocommer/)

 * 16 replies
 * 3 participants
 * Last reply from: [Dotstore](https://wordpress.org/support/users/dots/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/it-doesnt-show-2/page/2/#post-13115390)
 * Status: resolved