• Resolved mark8181

    (@mark8181)


    Hi all,

    I am testing the custom fields and I am currently using the hook add_action(‘woocommerce_after_shop_loop_item’, ‘front_end_price’, 8);

    I also used the woocommerce_after_shop_loop_item_title and many others, all with different priority.

    I would like to have a custom field right below the title and above the add to cart button, see the screenshot >>> https://app.screencast.com/xYqE8LdXPEBxy but all the fields stay above the product title.

    Thank you for your support

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @mark8181,

    The issue you’re experiencing might be due to the priority you’re setting in the hook. The lower the number, the earlier it will run.

    If you’re trying to place a custom field below the title and above the “Add to Cart” button, you might need to try using the woocommerce_after_shop_loop_item_title hook with a higher priority number. This will ensure that your custom field runs after the title.

    More info: https://www.businessbloomer.com/woocommerce-visual-hook-guide-archiveshopcat-page/

    If you are still having problems, we recommend asking development questions on the #developers channel of the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question. You can also seek help from the following:

    I wish I could help more, but hopefully, this gets you going in the right direction to get the job done.

    Thread Starter mark8181

    (@mark8181)

    Hi Shameen,

    Thank you for the answer. I had already tried the hook suggested but it does not work. Even if I set it with higher priority, I tried 10, 20, 30, 40, 50, 60, 70 and 80, the custom fields do not go below the title.

    If you have any idea, a part of contacting a developer, please let me know ??

    Marco

    Hi again @mark8181,

    If you have any idea, a part of contacting a developer, please let me know ??

    I understand your concern about trying to have a custom field right below the title and above the add to cart button.

    Helping out with custom coding of this nature is outside the scope of support, although I would recommend the following:

    1. Running the exact question you’re asking, along with the code provided, through an AI platform like ChatGPT for recommendations/changes to your code;
    2. Checking whether there are existing plugins in the WordPress plugin repository that might be doing that already.
    3. Joining our WooCommerce Slack community (it does have a developer channel where you can ask coding questions): https://woo.com/community-slack/

    In the meantime, I’ll leave this thread open, just in case any community members has ideas/suggestion on how to achieve the desired results.

    Hope it helps!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hook no changing position of custom field’ is closed to new replies.