put a text by default if the seller does not put price


  • Skander
    Newbie 4 points
    July 8, 2016 at 9:22 am

    Hi,
    I want to put a text by default (example: price on request) if the seller does not put price.
    How to do?
    thank you


  • Josh
    Super Guru 13,875 points
    July 8, 2016 at 2:38 pm

    Hello Skander,
    Try the below code under Theme Setup >General Setup >Custom CSS >Footer Styles

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

  • Skander
    Newbie 4 points
    July 8, 2016 at 2:58 pm

    Hi,
    I copied the code, but it did not work.

    ty

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

  • Josh
    Super Guru 13,875 points
    July 8, 2016 at 3:48 pm

    Please provide url
    Note:The code only works if a price is not set or the price field is empty


  • Skander
    Newbie 4 points
    July 8, 2016 at 3:52 pm

  • Josh
    Super Guru 13,875 points
    July 8, 2016 at 4:27 pm

    The code should work.Please clear your browser cache then check again.Or replace .wlt_shortcode_price with .wlt_search_results.grid_style .wlt_shortcode_price


  • Skander
    Newbie 4 points
    July 9, 2016 at 1:19 pm

    Hello,
    thank you for your help.

    When I add the following code :

    
    var myLength = $(".wlt_shortcode_price"). text().length
    jQuery(".wlt_shortcode_price").text(myLength);
    

    the result is 365 characters for all. including those supposed empty.

    My solution :

    jQuery(".wlt_shortcode_price:not(:contains('€'))").text("Price on request");
    

    it is not optimal, but it works.

    Once again thank you for your help.


  • Josh
    Super Guru 13,875 points
    July 11, 2016 at 1:02 pm

    You’re welcome Skander.Thanks for updating 🙂

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

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes