Site logo

Archived topic

ACF on Woocommerce Archive Page With Hook

3 replies · Started by Scott on February 28, 2021

Viewing posts 1–4 of 4

Hello guys!

I created an ACF field to show additional description/text at the bottom of Woocommerce Global Attribute Term Archive Pages. Text field shows and I have entered text into one of the attribute terms. I then created a hook in Elements to show the ACF shortcode ([acf field="bottomtext"]) in the hook "woocommerce_after_shop_loop", checked the execute Shortcodes box, and Set the Display Location to the Product Attribute pages. But, nothing shows. Have I missed something?
My purpose is to add SEO friendly text at both the top and bottom of the archive pages for SEO purposes if you have a better way. The top text comes from the included archive description field.
Thanks for your help!
Scott

Hi there,

Can you confirm if the shortcode actually works? Can you try testing it on other hooks like generate_after_header and add HTML comments (ex: <!--ACF bottomtext--> ) to it for markers?

Let us know.

I changed the hook the generatepress_after_header and added the HTML comments. The comments showed in the page source but the shortcode didn't work. I also tried using the PHP command <?php the_field('bottomtext'); ?> (and checked the PHP box) and it didn't work either?

This archived topic is closed to new replies.