Add Badge with Category or Date Modified

This topic contains 8 replies, has 3 voices, and was last updated by  Naveen Giri 1 year, 11 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #517528

    Tony Bellens
    Full Member
    Post count: 254

    Hi,

    I’m adding badges to the place archive items and added the ‘featured’ and ‘new’ ones but I was wondering if it is possible to add a badge that displays the category of the listing or a badge that displays the date the listing was modified/updated.

    I tried a few things but the category one just displays the word ‘categories’ and the modified badge shows the text ‘updated’.

    Thank you,
    Tony

    #517555

    Alex Rollin
    Moderator
    Post count: 27815

    For categories, you would need to add a badge for each individual category you want to display.

    For the post_modified badge try:

    
    
    
    [gd_post_badge key="post_modified" condition="is_not_empty" badge="%%input%%" bg_color="#0073aa" txt_color="#ffffff"]
    
    #517583

    Tony Bellens
    Full Member
    Post count: 254

    Thanks Alex. Modified is working nicely. Is there a way to edit the date format to day – month – year?

    Thank you,
    Tony

    #517713

    Alex Rollin
    Moderator
    Post count: 27815

    The Badge doesn’t ‘do’ anything with the data, just present what is in the DB, so that would require a customization.

    Instead of showing the date as a date you might consider changing the badge to be a ‘recently updated’ badge instead.

    For example

    
    
    
    [gd_post_badge key='post_modified' condition='is_less_than' search='+30' icon_class='fas fa-certificate' badge='Recently Updated!' bg_color='#ff0000' txt_color='#ffffff' alignment='left']
    
    #517725

    Tony Bellens
    Full Member
    Post count: 254

    Thank you Alex.

    #517739

    Tony Bellens
    Full Member
    Post count: 254

    Hi Alex,

    been trying a few options, but can’t seem to find the right settings to add a badge that displays that a listing has NOT been updated recently (let’s say in the past 90 days)

    Is that a possibility?

    Thank you,
    Tony

    #518028

    Tony Bellens
    Full Member
    Post count: 254

    Alex,

    ignore the previous post, please. I would like to add the following badges (if possible)

    I have a custom field for WiFi with 2 radio buttons
    Free
    Paid

    I would like to display a button with a green background if they selected Free and a button with a red background if they selected Paid.

    At the moment it is all green even if they didn’t select anything. And then some are not displaying.

    https://getdirections.asia/places

    Thank you,
    Tony

    #518040

    Tony Bellens
    Full Member
    Post count: 254

    Solved!

    #518058

    Naveen Giri
    Moderator
    Post count: 1559

    ok thanks for confirming. I will close it.

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

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

Open Support Ticket