Footer Sidebar & Woocommerce Images

Hi there I have two problems.

  1. I had an extra footer sidebar on all the pages (300) which shows accreditation images. Since the update this sidebar has disappeared from all the pages. The sidebar is still set up and is under Sidebars in the customiser and is also visable under Widgets. However it is absent from the pages! If you look inside the widget in customiser you get a message saying you can use the text in the new html widget available. Well thats great if you just started BUT I have 300 pages!

Please could you advise how I can get this sidebar back on please.

  1. After all the woocommerce changes the SALE sticker appears to have disappeared from the product page image. It shows on the image in the SHOP page but not on the product page itself.

Please could you advise how I can get this back on please.

Many thanks for your help.

I will add the url and login for support on a private reply.

Hi There,

That footer-extra-sidebar should display only if you have sidebar on the page. On Appearance > Sidebar I have enable it on X test page. It is showing instead of Main sidebar. See this: https://screencast-o-matic.com/watch/cbQUnbIwkO
All custom sidebar will replace default sidebar instead if you have enable page template with sidebar. It will only show on the footer if you have customize footer templates.

Regarding the sale badge, there’s change on Woocommerce 3.0. Product featured image with sale badge is now replace by the image slider with zoom in feature.

Hi Lely

No, I had it across the footer - this was in functions file

add_action(‘x_before_view_global__header-widget-areas’, ‘sidebar_right_after_footer_menu’);

function sidebar_right_after_footer_menu () {
dynamic_sidebar(‘footer-extra-sidebar’);
}

It was on all the pages and now its gone. It was an additional horizontal footer.

When the old support db was up the way of doing it was in the answers to my questions but I do not have access to that now.
Kind regards
Eileen

Hi there,

Would mind changing it to this?

add_action('x_before_colophon_begin', 'sidebar_right_after_footer_menu');

function sidebar_right_after_footer_menu () {
dynamic_sidebar('footer-extra-sidebar');
}

Your code is probably not working since the active templates aren’t the legacy (old structure).

Thanks!

Hi

I put that in the child theme functions file and it stopped the website from displaying.
They were fine in June as I had a look at a saved copy of the website.

Hi,

You need to replace your existing code with that one, not add it.

We simple replace x_before_view_global__header-widget-areas with x_before_colophon_begin hook.

Thanks

Hi Paul

Hi There

Did not make any difference. Page loads ok but the extra footer not there.

Kind regards

Eileen

Hello Eileen,

The code did not work because you are referencing a non existent sidebar. Please have the code updated and use this instead:

add_action('x_before_colophon_begin', 'sidebar_right_after_footer_menu');

function sidebar_right_after_footer_menu () {
  dynamic_sidebar('ups-sidebar-footer-extra-sidebar');
}

We would loved to know if this has work for you. Thank you.

Hi There

No, that does not work. I tried that anyway. I have temporarily put in another section on the home page and manually put the info in BUT I really need the sidebar to work as I have 300 pages and I cannot manually put this in on all of those.

Kind regards

Hi there,

In that case, please provide your FTP login credentials as well. I like to check what templates are being loaded, but it’s usually the legacy templates.

Thanks!

Ok details below

Hi there,

I’m able to connect to your site’s FTP, but I’m unable to access the folders.

Command:	MLSD
Error:	Connection timed out after 20 seconds of inactivity
Error:	Failed to retrieve directory listing

If you have cPanel credentials then we could use its file manager instead of FTP. For the meantime, please change your code to this

add_action('x_after_view_global__nav-footer', 'sidebar_right_after_footer_menu');

function sidebar_right_after_footer_menu () {
  dynamic_sidebar('ups-sidebar-footer-extra-sidebar');
}

OR

add_action('x_after_view_global__footer', 'sidebar_right_after_footer_menu');

function sidebar_right_after_footer_menu () {
  dynamic_sidebar('ups-sidebar-footer-extra-sidebar');
}

That’s the hook used for legacy templates. The first one should work only if footer menu is active, while the second place the sidebar below all other footer sections.

Thanks!

Hi There Rad

The first code did not work.

The second code worked BUT it place it right at the bottom of the page and not where I want it where my manual one is now shown on the home page.

I tried playing around with it but it would not move above the information area.

So its basically the right code but we just need to get it in position now. that is above the footer.x_colophone.top

I am using Plesk but thought you would have been able to get in via filezilla but will take a look.

Is there a way of chnging the second code so that it puts it in the right place.

Kind regards

Eileen

Hi Eileen,

You can try this code instead.

add_action('x_after_the_content_end', 'sidebar_right_after_footer_menu');

function sidebar_right_after_footer_menu () {
   dynamic_sidebar('ups-sidebar-footer-extra-sidebar');
}

You may add it in your child theme’s functions.php file af ther this lie.

// Additional Functions
// =============================================================================

Thanks

Yay Paul you did it - it all works back how it was.

Thank you sooooo much for your patience.

You’re welcome! :slight_smile:

Hi Paul

The sidebar used to be on the product pages as well. I have looked at the product page and the footer programming seems to be the same. Is there anything else I can add or do to get it to show on all the product pages in the same place as the normal pages.

Many thanks.

Hi there,

Because of the filter, it’s only applicable after the_content ( x_after_the_content_end ) which products don’t have that hook. How about the second code that I provided, but instead of after, change it to before like this

add_action('x_before_view_global__footer', 'sidebar_right_after_footer_menu');

function sidebar_right_after_footer_menu () {
  dynamic_sidebar('ups-sidebar-footer-extra-sidebar');
}

Hope this helps.

Hi Rad

No, that just pushes everything to the bottom of the page. Where it is now on the pages is where it was and it was in the same place on the product pages ie just above all the footer information.

Do we need to put a seperate one in for the product pages maybe because of the new way of x working with woocommerce - I dont know!

The product pages are reading the main code because the footer info is on them so somehow the sidebar needs to get on those.

I cannot understand why the functions.php is not working on those product pages when it is fine on all the others.

Kind regards

Hi There,

That is because global footer is below footer widget areas and footer bottom content.

We can add the code instead directly on woocommerce page template. Look for this file:
wp-content\themes\x\framework\views\renew\woocommerce.php.. Copy that file on the same folder on your child theme. Create the folder if it doesn’t exist. Open the copied file and then add this line:

<?php dynamic_sidebar('ups-sidebar-footer-extra-sidebar'); ?>

Just above this part:

</div>
<?php get_footer(); ?>

See how I implement: https://screencast-o-matic.com/watch/cb62hTIHxZ

This code directly add the widgets on woocommerce pages, on the other hand the previous suggested code is working fine on other pages.

Hope this helps.