Home Forums WoodMart support forum custom short text after price via code

custom short text after price via code

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #344940

    auroramarinecode
    Participant

    I want to show 4 words on the shop page after price. Your theme does not have this option and i read somewhere one of your agent said this code
    /**
    * to show the product extra field -> product list short text on the shop page
    * below product title
    * */
    add_action( ‘woocommerce_after_shop_loop_item_title’, ‘custom_field_display_below_title’, 2 );
    function custom_field_display_below_title(){
    global $product;

    // Get the custom field value
    $custom_field = get_post_meta( $product->get_id(), ‘product_list_short_text’, true );

    // Display
    if( ! empty($custom_field) ){
    echo ‘<p class=”my-custom-field”>’.$custom_field.'</p>’;
    }
    }
    but when i did it some prices hid and some are there i think it is because of priority numbers. How ever i want any solution either show the text after price or before price but dont hide the price. How can i do this ? See the image

    Attachments:
    You must be logged in to view attached files.
    #344991

    Hello,

    Woocommerce does not provide this option. Our support relates to WoodMart only and does not cover checking or fixing third parties codes.

    Best Regards

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