Archived topic
generate_footer Location in Elements not working on WooCommerce
26 replies · Started by Peter on July 19, 2021
Hi
I have a global footer generated using elements of type Block - Hook (generate_footer) with location set to entire site. But it is not working on the search page with WooCommerce. The standard GP footer is shown instead. See an example search page to see the footer. I can reproduce the same problem on a localhost version with only GB, GP Premium and WooCommerce plugins active. The problem only appeared on localhost after updating to the latest WooCommerce version (5.5.1) from an older version.
Hi Peter,
I can't replicate the same issue while using WooCommerce 5.5.1.
Can you take a screenshot of all your elements to check if there are location conflicts?
https://docs.generatepress.com/article/using-the-premium-support-forum/#uploading-screenshots
Or you can try to set all other elements to draft, see if it works.
Let me know :)
Hi Ying,
Here is the screenshot - elements screenshot
On localhost I set the only other element to draft and the problem wsa still there.
Thanks
Peter
Hum...that's weird, the location rules of elements look all right.
Can you try set the footer element's element type to site footer to test?
https://www.screencast.com/t/jk2FaYY2P
And what's the GP and GP premium version you are using? Are they up to date?
Are you using a child theme?
Setting the element type to site footer made no difference. Versions are:
GP : 3.0.4
GP Premium : 2.0.3
GB : 1.3.5
Yes a child theme is being used, but problem is still there when using GP main theme.
Just to make sure, the issue is only happening on the search results page?
Any custom functions added for the search results page?
It only happens on the product search page. I just checked a normal search and the footer is OK. See product search and normal search.
There aren't any custom functions added for search results.
Hi Peter,
Any chance you can clone the site to a staging site and let us have backend access to inspect?
You can provide the site details on the private information text field. Let us know. :D
Hi Elvin,
I'll get a clone set up and post details on the private information when done.
Hi Elvin,
The clone is now set up. Details are in the private information.
Hi there,
i logged into your site, went to Woocommerce > Status > Tools and cleared the Template Caches, and it seems to be working now.
Hi David,
I'm still seeing the wrong footer on the product search page like before - see product search page. Do you see the default GP footer or the correct elements generated footer on that link?
Still seems to be hard caching somewhere.
I changed the search to string pen and then the footer appeared.
Yes, that works for me too. But putting different search phrases in seems to give the correct footer sometimes, and the incorrect one at other times. I used a random text search here and that give the wrong footer too. If the caching is per search term then that seems odd as I'm sure nobody would have searched on that.
The template and therefore the hook doesn't change for different search terms. So i am 99% certain theres a caching issue, do you have any page caching on the server ? As it may have cached the search results template without the footer