Banner does not show on the Shop Page

Thank you Rue, it does makes sense.

I was able to change the action hook from the documentation you have provided. This brought the Banner back on the Store’s Page. The problem is with the Ratings Page. Since there is already a Banner on the Ratings page. Adding this function adds another Banner on the Ratings Page. The other issue is - the header and footer are missing from the Ratings page. Please note, the missing of the header and footer is independent of the function added.

Hi @Mang,

This might be due to the 3rd Party plugin WC Vendors Pro you are using. I would suggest you check with the plugin author for specific page slug(s) or any function which recognizes the specific pages for rating and add that to the if clause to the function called in the Action Hook.

Hope it helps.
Thanks

Hi,

I did speak with the Plugin author - since the issue only happens with Pro theme and no other theme, they think it is a Theme issue, which makes sense. As mentioned earlier, I tried with few Theme, all of them are rendering the Header and Footer properly. Also there is no duplication of Banner.

Thanks

Hey @Mang,

This is technically not an issue with Pro because we removed the woocommerce_before_main_content action in our themes on purpose for styling purposes. Bringing it back or integrating a 3rd party function to our themes is still custom development.

This case is a conflict between our theme and your plugin and we still do not provide support for this.
We can report issues to our development team if our theme is really the cause of the issue but we don’t guarantee to provide a workaround or a fix.

Because we have removed the woocommerce_before_main_content hook, you need to use other WooCommerce or theme hooks like x_after_masthead_end. We can guide you on what theme hooks to override but we cannot write code for you. You can see all of our WooCommerce overrides in the woocommerce.php located in framework\functions\plugins

x_after_masthead_end is our theme’s hook that will output below the Pro Header.


Regarding the duplication of your plugin’s header, please contact the plugin developer to disable their header on the rating page as we do not know how they’re doing that. If you coordinate this with the plugin developer and show us how they’re outputting their plugin’s header in the Ratings page then maybe we can tell what’s happening.

Thanks.

Hi Christian,

Thank you for the insight about the woocommerce_before_main_content hook. This was actually the issue with double banner being rendered. I have commented those hooks and it resolved the issue of double banner.

Reunel sent me the link of the hooks through which I was able to show the Banner on the stores page.

I am not looking for your team to write code for me, just these insights which would help figure out what could be causing the conflict.

Thank you for your help, as always.

Hello @Mang,

Do you have other PHP codes in your child theme’s functions.php file? To better assist you with your issue, kindly provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

Created Secure Note.

Thanks

Hello @Mang,

We cannot log in to your site. Your login page seems empty with no login form in it.

Please double-check.

Sorry, Please try now.

Hello @Mang,

You have added these lines in your custom template:

<div class="x-container max width offset">
<div class="x-main right" role ="main"> 

Please remove it including the closing divs and see how it goes.

The page gets distorted without those. I have removed those lines. Please see how it look without those lines.

Hello @Mang,

Can you please remove your WC Vendors Pro modifications from the child theme? We need to check how it displays the theme without any integration. It seems that the custom header and footer were not displayed even if you have already set them as Global.

kindly let us know how it goes.

I have removed all WC Vendors Pro modifications from the child theme.

Thanks

Hi @Mang,

It seems that the below given code is actually loading the Header twice in the rating page. Now if you want it to be skipped in case of Rating page, you need write the exception for that page.

add_action('x_after_masthead_end', 'display_the_banner_here');
function display_the_banner_here () 
{
    if ( x_is_shop() || x_is_product_category() || x_is_product_tag() ) 
    {
        //here you need to write the exception to skip your rating page
        do_action( 'woocommerce_before_main_content',  array( $wcvendors_pro->wcvendors_pro_vendor_controller,  'store_main_content_header'),  1 );
    }
} 

Please note that, we don’t really provide support for custom development like this one. And we strongly recommend contacting a developer on this.

Thanks

Double Banner is not the issue any more. The issue is about Header and Footer now showing on the Ratings Page. Hope you get to check the conversation.

Thanks

I can also change the theme to Pro Theme so that you can see things without any customization done in Pro-child theme.
Also to Ruenel comment - It seems that the custom header and footer were not displayed even if you have already set them as Global. - This is correct.

Hey @Mang,

Yes, the global header and footer don’t display even using the parent theme and that is because the WC Vendors Pro plugin is using the Shop header. I tried removing the 'shop' part in the code to see if it works but your site went down because I accidentally left a space in the code which caused an error.

image

Please reinstall WC Vendors Pro by deleting its folder in your plugins folder and then try removing the 'shop' part in the code. If it works, override the Ratings template of the WC Vendors Pro plugin.

If it does not work, please provide FTP access but please note that this case is a plugin conflict with our theme and we do not provide support for this. What we can do is check if our theme is really the cause of the issue.

Thanks.

When I remove the shop header, it distorts the page. Please see attached.

Hello @Mang,

Can you please use just the get_header(); and get_footer(); in your WC Vendors Pro template?

Kindly let us know how it goes.

Hi,

It did not work. Please see attached.

Thanks