• Resolved muneeba1

    (@muneeba1)


    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.

    • This topic was modified 4 years, 4 months ago by muneeba1.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi there,

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook Community group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Cheers.

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    We’ve not seen any activity on this thread for a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution and the above resources for developers were helpful. If you have further questions, please feel free to open a new topic.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom woocommerce function issue’ is closed to new replies.