How to position a new badge under the title

This topic contains 10 replies, has 3 voices, and was last updated by  Vicky Thorton 5 years, 4 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #494927

    Vicky Thorton
    Free User
    Post count: 24

    Hello team GD
    I created a badge according to the instructions with the GD_post_badge widget and shortcode but i cannot get it under the title.
    Only on the right corner as you can see in the attachment.
    How can i position the badge under the title?
    Should i set it inline like the rest of the badge (i.e facebook,twitter,link..)
    Also,can i add an image to a badge instead of fontawesome?
    Thanks

    #494936

    Alex Rollin
    Moderator
    Post count: 27815

    It is not possible to add anything in to the header/featured area at the very top without opening the page templates.

    But, I think you are wanting to add the badge into the GD Detail template, yes, at the top?

    And using the GeoDirectory Single template on the GD Details template?
    If you want to customize it without writing PHP you should use the GeoDirectory template instead, so you can make the header detail info area exactly how you want. Have you tried that?
    https://wpgeodirectory.com/docs-v2/themes/supreme/

    #495175

    Vicky Thorton
    Free User
    Post count: 24

    This is what i’m trying to achieve (screenshot)
    I would like to place my own bagde-custom field below the title.
    Yes i’m using the GD details page. I have tried all pages attributes but with no success.
    Are you referring to ”CSS for the GeoDirectory Single Page template Detail Info Header Section” of the link you posted? Because it only gives examples of how to hide something from details info.
    I followed this https://wpgeodirectory.com/docs-v2/geodirectory/featured-listings/ to achieve my goal but i don’t want it to be ”featured” or for a certain time i.e ”new” for 30 days

    #495387

    Alex Rollin
    Moderator
    Post count: 27815

    The Supreme GeoDirectory Single is a template created in PHP. It can be edited with hooks and filters. Open it up and you can see those. We do not recommend editing the file directly because changes will be overwritten on update.

    If you are not a developer then you should use the GeoDirectory template instead so you can add or edit the entire page to meet your needs.

    #495849

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Vicky,

    If you want us to take a look on it. Please share site credentials and FTP details to move forward.

    Thanks

    #496050

    Vicky Thorton
    Free User
    Post count: 24

    Thanks Naveen i will.

    Meanwhile, is there a mistake in this sentence? ” we will insert a “gd_post_badge” the settings have details explanations of what they do but the two main settings we want to set are:”
    https://wpgeodirectory.com/docs-v2/geodirectory/featured-listings/#badge-setup
    I cannot understand it

    #496060

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Vicky,
    You have to add the gd_post_badge shortcode or block if using Gutenberg layout in Archive item page to show the badge.

    It will show the badge on archive listing page.
    Please check the screenshot below.

    #497641

    Naveen Giri
    Moderator
    Post count: 1559

    Hi @vicky9,

    Just checking if you still need help for this ticket.
    If yes, please share the requested details.

    #497779

    Vicky Thorton
    Free User
    Post count: 24
    This reply has been marked as private.
    #497903

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Vicky,

    You can use below code to add badge under the listing title.
    you will have to replace the shortcode with your actual shortcodes.

    
    
    
    add_filter('sd_details_output_social_shortcode', 'gd_sd_details_output_social_shortcode_callback');
    function gd_sd_details_output_social_shortcode_callback( $social_shortcodes ){
    
    	$social_shortcodes .= '[gd_post_badge key="for_sale" condition="is_not_empty" icon_class="fas fa-for_sale fa-fw" link="%%input%%" badge="%%input%%" new_window="1" badge="For Sale" bg_color="#ed6d61" txt_color="#ffffff" alignment="left"]';
    
    	$social_shortcodes .= '[gd_post_badge key="featured" condition="is_not_empty" icon_class="fas fa-featured fa-fw" link="%%input%%" badge="%%input%%" new_window="1" badge="Featured" bg_color="#ed6d61" txt_color="#ffffff" alignment="left"]';
    
    	return $social_shortcodes;
    }
    

    If you not sure about where to add the code. you can use
    https://wpgeodirectory.com/docs-v2/faq/customizing/#snippets

    Regards

    #498101

    Vicky Thorton
    Free User
    Post count: 24

    Thanks a million!
    I would never figured out myself-too advanced

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