Badges?

This topic contains 11 replies, has 5 voices, and was last updated by  Nigel Hancock 5 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #514093

    Nigel Hancock
    Expired Member
    Post count: 83

    This works fine …

    [gd_post_badge key='post_date' condition='is_less_than' search='+7' icon_class='fas fa-certificate' badge='New' bg_color='#24425C' txt_color='#ffffff' alignment='left']

    This doesn’t …

    [gd_post_badge key='post_modified' condition='is_less_than' search='+7' icon_class='fas fa-certificate' badge='Updated' bg_color='#24425C' txt_color='#ffffff' alignment='left']

    The only difference being post_modified rather than post_date.

    I can output post_modified using [gd_post_meta key=”post_modified”] and the date format looks ok – any ideas please?

    #514112

    Kor
    Moderator
    Post count: 16516

    Hi Nigel,

    Thanks for your post. You can only select the field keys that are available in the dropdown list as shown in the attached screenshot and you can always check the available parameters using the shortcode builder. https://wpgeodirectory.com/docs-v2/geodirectory/shortcode-builder/

    #514120

    Nigel Hancock
    Expired Member
    Post count: 83

    ok, so using the shortcode builder, I have …

    [gd_post_badge key=”last_updated” condition=”is_less_than” search=”+7″ badge=”Updated” bg_color=”#0073aa” txt_color=”#ffffff”]

    Where “last_updated” is a custom date field.

    I am able to display “last_updated” with [gd_post_meta key=”last_updated”] so it does exist in a proper date format and I can actually display a badge using the condition “is not empty” so why isn’t the “is less than” condition not working?

    #514149

    Alex Rollin
    Moderator
    Post count: 27815

    HI Nigel,

    we will check into it. Could you share WP Admin credentials so we can see how you set it up?

    Thanks

    #514230

    Nigel Hancock
    Expired Member
    Post count: 83
    This reply has been marked as private.
    #514370

    Nigel Hancock
    Expired Member
    Post count: 83

    Any update on this please?

    #514374

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Nigel,

    I have taken a look. could you please provide FTP details in private reply. so i can look it code wise.

    Thanks

    #514376

    Nigel Hancock
    Expired Member
    Post count: 83
    This reply has been marked as private.
    #514405

    Kiran
    Moderator
    Post count: 7069

    Hi Nigel,

    We have added post_modified support in post badge.

    Ex:

    [gd_post_badge key='post_modified' condition='is_less_than' search='+7' icon_class='fas fa-certificate' badge='Updated' bg_color='#24425C' txt_color='#ffffff' alignment='left']

    I have applied patch on your site, please check and let us know.

    Regards,
    Kiran

    #514407

    Nigel Hancock
    Expired Member
    Post count: 83

    Thanks Kiran, that seems to work. Is that a patch that’ll be included in future updates? I have several sites where this will need to be implemented.

    #514408

    Kiran
    Moderator
    Post count: 7069

    Yes, it will be in future release as well.

    Here is patch: https://github.com/AyeCode/geodirectory/commit/1e1c4c171ee1cb024082383b0f0bbc817dce15f5

    Kiran

    #514413

    Nigel Hancock
    Expired Member
    Post count: 83

    Brilliant, thank you Kiran!

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount