Display Favorite option using a shortcode?

This topic contains 5 replies, has 2 voices, and was last updated by  Alex Rollin 6 years, 4 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #458311

    cparekh
    Free User
    Post count: 4

    Hi,

    I’m creating a custom listings layout, for a CPT, using Beaver Builder and want to display the ‘Favorite’ option for each item – is there a shortcode I can use to do this?

    In the same way, I’d like to display the value of a field for the CPT – is there a shortcode for cpt fields?

    Many thanks.
    C.

    #458328

    Alex Rollin
    Moderator
    Post count: 27815
    #458348

    cparekh
    Free User
    Post count: 4

    Hi Alex, many thanks for the quick response.

    Are the different options/arguments for the shortcodes documented? For example for Favorite I want to only display the heart icon and not the ‘Favorite’ text (btw I tried the shortcode creator but the copy option only copies the core shortcode i.e. [gd_post_fav] and not the selected options for it. The insert option doesn’t insert anything into the editor – I’m using v2).

    I can see I can do this to only show the text link – [gd_post_fav show=”text”] – but not sure what the value should be to only display the icon.

    I checked https://wpgeodirectory.com/docs-v2/geodirectory/design-elements/

    Many thanks,
    C.

    #458409

    Alex Rollin
    Moderator
    Post count: 27815

    [gd_post_fav show=”stars”]

    #458505

    cparekh
    Free User
    Post count: 4

    Hi,

    I tried that but both the icon and text are hidden. When I remove this class (gd-fav-hide-text), using the inspector, both are displayed…

    This is what it looks like

    
    
    <div class="geodir_post_meta gd-fav-info-wrap  gd-fav-hide-text ">        <span class="gd-list-favorite">
                <span class="geodir-addtofav favorite_property_2101"><a class="geodir-addtofav-icon" href="javascript:void(0);" onclick="javascript:window.location.href='https://site.net/wp-login.php?redirect_to=https%3A%2F%2Fsite.net%2Ftherapy%2Ffind-a-therapist%2F'" title="Add to Favorites"><i class="fas fa-heart"></i> Favorite</a></span>
    	        </span>
            </div>

    (I’ve swapped out the true website domain for ‘site.net’)

    Am I missing a setting somewhere?

    #458589

    Alex Rollin
    Moderator
    Post count: 27815

    We can take a look at that, this should work:

    
    
    
    [gd_post_fav show='stars' alignment='' ]
    

    If you want us to take a look write back in a private reply with WP Admin credentials and a link to the edit page where we can see the shortcode.

Viewing 6 posts - 1 through 6 (of 6 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