skip to Main Content

I am trying to add code php after price (not on single product pages) but on shop pages and archive page woocommerce.

Code

<?php echo CFS()->get( 'name-code' ); ?>

This is the insert code from the Custom Field Suite plugin

Sincere thanks !

2

Answers


  1. Chosen as BEST ANSWER

    I found a great solution Here is the result

    function woocommerce_after_cat_price() {
        echo CFS()->get( 'name-code' );
    }
    add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_after_cat_price', 10, 5 );
    

  2. You can’t just push PHP code into normal text editors etc…
    You need to find exact file that render those page’s and write it in php file

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search