'GD > Features' widget shortcode available?

This topic contains 5 replies, has 3 voices, and was last updated by  Giri 8 years, 1 month ago.

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

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #162204

    Joanna
    Expired Member
    Post count: 21

    Hi support,

    I was hoping that there is a shortcode for the equivalent of the ‘GD > Features’ widget, is there one as I can’t find it on the core shortcodes doc page.

    https://wpgeodirectory.com/docs/core-shortcodes/#listings

    If there isn’t a shortcode for it, are there any plans to make it as I would like to show the Features on a page of its own in the main contents.

    Thanks,
    Joanna

    #162629

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    no there isn’t at the moment. That widget has been created for a Theme that we will release soon and we never worked on the shortcode for it.

    I’ve flagged this for the developers. They’ll add the shortcode to the next version.

    Thanks for your patience,

    #162636

    Giri
    Expired Member
    Post count: 3155

    We don’t have any shortcode for that. But its very easy. So you can use html if this is very urgent for you

    This is how code syntax look like

    
    
    <ul class='gd-features'>
            <li>       
                <h3 class='gd-fe-title'>Your title Goes here</h3>
                <div class='gd-fe-image'>img goes here</div>
                <div class='gd-fe-desc'>Description goes here</div>
            </li>
    </ul>

    Just duplicate the

    <li>....</li>

    part, if you would like to add more items.

    For image you can use normal image or font awesome icon.

    Normal image

    
    
    <ul class='gd-features'>
            <li>       
                <h3 class='gd-fe-title'>Your title Goes here</h3>
                <div class='gd-fe-image'><img src="image url here" /></div>
                <div class='gd-fe-desc'>Description goes here</div>
            </li>
    </ul>

    Font awesome icon.

    
    
    <ul class='gd-features'>
            <li>       
                <h3 class='gd-fe-title'>Your title Goes here</h3>
                <div class='gd-fe-image'><i style="color:#757575" class="fa fa-facebook"></i></div>
                <div class='gd-fe-desc'>Description goes here</div>
            </li>
    </ul>
    #162640

    Giri
    Expired Member
    Post count: 3155

    If you want that as a shortcode just follow these steps. Put the following code in your child theme’s functions.php file

    
    
    function gd_features_custom_sc() {
    ?>
    <ul class='gd-features'>
            <li>       
                <h3 class='gd-fe-title'>Your title Goes here</h3>
                <div class='gd-fe-image'>img goes here</div>
                <div class='gd-fe-desc'>Description goes here</div>
            </li>
    </ul>
    <?php    
    }
    add_shortcode('gd_features_custom_sc', 'gd_features_custom_sc');

    Then you can use shortcode like

    [gd_features_custom_sc]
    #162835

    Joanna
    Expired Member
    Post count: 21

    Thank you very much! That worked for me.

    I added the shortcut to my child theme functions.php file and tweaked it so I could get three in a row. Probably a bit of a hack but it worked!

    Just in case its useful for everyone else, here’s the code structure I used:

    
    
    
    function gd_features_custom_sc() {
    ?>
    <section id="geodir_features_widget-3" class="widget geodir-widget widget_gd_features"> 
    <ul class="gd-features">
    	<li>
    		<h3 class="gd-fe-title">Feature Title</h3>
    		<div class="gd-fe-image"><i style="color:#1e73be" class="fa fa-star"></i></div>
    		<div class="gd-fe-desc">The feature description goes here</div></li>
    	<li>
    		<h3 class="gd-fe-title">Feature Title</h3>
    		<div class="gd-fe-image"><i style="color:#1e73be" class="fa fa-star"></i></div>
    		<div class="gd-fe-desc">The feature description goes here</div></li>
    	<li>
    		<h3 class="gd-fe-title">Feature Title</h3>
    		<div class="gd-fe-image"><i style="color:#1e73be" class="fa fa-star"></i></div>
    		<div class="gd-fe-desc">The feature description goes here</div>
    	</li>
    </ul>
    </section>
    <?php    
    }
    add_shortcode('gd_features_custom_sc', 'gd_features_custom_sc');
    
    #163266

    Giri
    Expired Member
    Post count: 3155

    You are welcome 🙂

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