popular post shortcode title

This topic contains 19 replies, has 4 voices, and was last updated by  RITA 7 years ago.

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

Open Support Ticket
  • Author
    Posts
  • #377634

    RITA
    Expired Member
    Post count: 119

    Hello,

    I’m using the gd_popular_post_view shortcode. The documentation says we can add a title, but I can’t display it. here is an exemple of my shortcode :

    [gd_popular_post_view post_type=gd_place layout=3 category=”266″ post_number=”12″ list_sort=”high_review” character_count=”200″ add_location_filter=true show_featured_only=false title=”Offres”]

    Can you help please ?

    #377638

    Kor
    Moderator
    Post count: 16516

    Hi Rita,

    I’ve just tested it on my local dev site and it works fine. Could you please remove the double quotes from the title parameter and try again?

    Thanks!

    #377654

    RITA
    Expired Member
    Post count: 119

    Hi Kor,

    Thank you for the quick answer !

    It seems to be a problem with the location page template only. I use this shortcode into the location description (multilocation addon, shortcode enable into functions.php). There the title doesn’t display, but on a “normal” page it works normally :

    Normal page example :
    http://leguidedesvoyageurs.ma/test-shortcode/

    Location page example :
    http://leguidedesvoyageurs.ma/location/maroc-1/

    I have deleted all CSS, but no effect. Any idea ?

    Regards

    #377686

    Kor
    Moderator
    Post count: 16516

    Hi Rita,

    Thanks for your reply. Please share WP temp admin access to your site so we can take a better look. You can post the details here using the private reply option below.

    #377714

    RITA
    Expired Member
    Post count: 119
    This reply has been marked as private.
    #377721

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hello,

    on the locations page u can just add the widget, use the “home” widget areas, the are the used for the location page also.

    Thanks,

    Stiofan

    #377723

    RITA
    Expired Member
    Post count: 119

    Hi stofian,

    Hi use the GD description Widget into the Home content widget area section.

    The shortcode is into the SEO description. It works well for many shortcodes. Only this issue with the popular shortcode title…

    #377737

    Kiran
    Moderator
    Post count: 7069

    Hi Rita,

    Please check and let us know.

    Thanks,
    Kiran

    #377745

    RITA
    Expired Member
    Post count: 119

    Hi Kiran,

    Check what ? I missed something sorry. If you are talking about the widget, it works great.

    But I need to use the shortcode in my situations. Can you telle me if the popular locations shortcode displays the title in your install (using it on location SEO description), or if I need to do something ?

    If it is a “normal” behaviour and requires custom code I understand you won’t help more on this subject. FYI the title is well displayed using the [gd_listings] shortcode. So if the problem can’t be solved I will try to use this one instead.

    regards

    #377746

    RITA
    Expired Member
    Post count: 119

    My bad, I can’t use the [gd_listings] shortcode instead because it doesn’t have an option to add a “show all” button as the [gd_popular_post_view] does. May be it is possible to add it ?

    #377747

    Kiran
    Moderator
    Post count: 7069

    Hi Rita,

    I am talking about to check widget http://leguidedesvoyageurs.ma/location/maroc-1/

    The design layout fixed by few css changes in location manager plugin css. This changes has been updated on your site too and it will be also in next release.

    > But I need to use the shortcode in my situations. Can you tell me if the popular locations shortcode displays the title in your install (using it on location SEO description), or if I need to do something ?
    <
    I have minor change in style.css file of supreme directory change to display shortcode title within widget. See my change https://github.com/kprajapatii/supreme-directory/commit/658766fcc38e44db6d94353ce73810ef1b0b826a#diff-da232d78aa810382f2dcdceae308ff8eR405
    This change has been update on your site too.

    This fix will work for all shortcodes used in location description widget.

    I can’t use the [gd_listings] shortcode instead because it doesn’t have an option to add a “show all” button as the [gd_popular_post_view] does. May be it is possible to add it ?
    < You can use [gd_popular_post_view]. If using [gd_popular_post_view] have any problem, then let us know.

    Let us know.

    #377758

    RITA
    Expired Member
    Post count: 119

    Thank you Kiran.

    But I steel don’t see the Title 🙂
    See attached files.
    As I told you, widget works well (with title too). I have this issue only with the [gd_popular_post_view] shortcode when used on seo description for location pages.

    Many thanks for your time.

    #377826

    Kiran
    Moderator
    Post count: 7069

    Hi Rita,

    Let me know on which page has this problem.

    I have checked on page http://leguidedesvoyageurs.ma/location/maroc-1/ and there it is working fine. Please check attachment.

    If you talking same page then try again after clearing browser cache.

    Kiran

    #377840

    RITA
    Expired Member
    Post count: 119

    The cache off course… sorry ! That’s perfect Kiran, thanks a lot 🙂

    Please, can you detail the changes you did in location manager shortcode in case I have to reproduce it ?

    And for the supreme directory css changes, will I have to reproduce it on other websites or is it a theme update ?

    Last question : Is it possible to use font awesome or any other solution to display an icon next to the title ? I have tried [icon name=”coffee”], <i class=”icon icon-coffee”></i> or “” without good result.

    best regards

    #377852

    Kiran
    Moderator
    Post count: 7069

    Hi Rita,

    > can you detail the changes you did in location manager shortcode in case I have to reproduce it ?
    < Changes will be included in next update of Location Manager plugin too, so don’t worry.

    > And for the supreme directory css changes, will I have to reproduce it on other websites or is it a theme update ?
    < This changes also will be in next update of supreme directory. If you are currently using supreme directory on other site then you can just do change in css as here https://github.com/kprajapatii/supreme-directory/commit/658766fcc38e44db6d94353ce73810ef1b0b826a#diff-da232d78aa810382f2dcdceae308ff8eR405 .

    > Is it possible to use font awesome or any other solution to display an icon next to the title ? I have tried [icon name=”coffee”], <i class=”icon icon-coffee”></i> or “” without good result.
    <
    Try this code snippet to add icon before shortcode widget title

    
    
    
    function gd_custom_ppv_sc_widget_title( $title ) {
        $match_title = 'Offers'; // Your current title.
        $icon_element = '<i class="fa fa-hand-o-right" aria-hidden="true"></i>'; // You icon element.
    
        if ( $title == __( $match_title, 'geodirectory' ) ) {
            $title = $icon_element . '&nbsp;&nbsp;' . $title;
        }
        
        return $title;
    }
    add_filter( 'widget_title', 'gd_custom_ppv_sc_widget_title', 10, 1 );
    

    Thanks,
    Kiran

Viewing 15 posts - 1 through 15 (of 20 total)

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

Open Support Ticket