Custom woocommerce function issue
-
Hi,
I am using custom woo commerce by overriding templates. I am facing an issue with the shop page template (i.e. archive-product.php). The issue is, that I want to access custom fields that I have created on the shop page from admin but I am not able to access it from code without including hard-coded page-id. Now I want to make that ID dynamic. get_the_ID(); is not working on the archive page so can you please let me know through which function I can make it dynamic?
Also, I want to access images from the admin panel of the shop page but they are not accessible through following code:
<img src=”<?php
echo get_field(‘method_1’,72);
?>”
/>
where method_1 is the custom field and 72 is the shop page ID.Please let me know my queries asap.
Thanks.
The topic ‘Custom woocommerce function issue’ is closed to new replies.