clickable breadcrums in listing

This topic contains 10 replies, has 4 voices, and was last updated by  Giri 8 years, 8 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #237220

    sylvester vader
    Buyer
    Post count: 151

    Hi im wodering if there is a way to make address texts in listings clickable

    like clickable breadcrums

    #237570

    Guust
    Moderator
    Post count: 29970

    That is the address of the listing, but you might be able to add a breadcrumb there as well [in Supreme]. I have asked Paolo to have a look at your question after the weekend.

    #237613

    sylvester vader
    Buyer
    Post count: 151

    yes what i would like is that spain has a link that goes to location/spain/
    so on and so on

    city to go to city and region to show the whole region

    its better for site and better for google

    i can change inside script but i wont change source unless no other way

    #238233

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    mods will have to be made in functions.php of the theme.

    I asked to the developers to give us some more pointers with maybe a quick example.

    They’ll let us know asap.

    Thanks

    #238951

    Giri
    Expired Member
    Post count: 3155

    Hi there, i have added some filters in supreme. You need to apply the changes in your website and then use the following code in supreme functions.php

    Please post your ftp details. I’ll apply the changes

    
    
    
    function sd_permalink_city_name($name, $post) {
        $location_link = geodir_get_location_link('base');
        if ( get_option('permalink_structure') != '' ) {
            $location_link .= $post->city_slug;
        }
        else {
            $location_link .= '&gd_city='.$post->city_slug;
        }
        return '<a href="'.$location_link.'">'.$name.'</a>';
    }
    add_filter( 'sd_detail_city_name', 'sd_permalink_city_name', 10, 2 );
    
    function sd_permalink_region_name($name, $post) {
        $location_link = geodir_get_location_link('base');
        if ( get_option('permalink_structure') != '' ) {
            $location_link .= $post->region_slug;
        }
        else {
            $location_link .= '&gd_region='.$post->region_slug;
        }
        return '<a href="'.$location_link.'">'.$name.'</a>';
    }
    add_filter( 'sd_detail_region_name', 'sd_permalink_region_name', 10, 2 );
    
    function sd_permalink_country_name($name, $post) {
        $location_link = geodir_get_location_link('base');
        if ( get_option('permalink_structure') != '' ) {
            $location_link .= $post->country_slug;
        }
        else {
            $location_link .= '&gd_country='.$post->country_slug;
        }
        return '<a href="'.$location_link.'">'.$name.'</a>';
    }
    add_filter( 'sd_detail_country_name', 'sd_permalink_country_name', 10, 2 );
    #239002

    sylvester vader
    Buyer
    Post count: 151
    This reply has been marked as private.
    #239008

    Giri
    Expired Member
    Post count: 3155

    Hi there, I have applied supreme code changes in your site. However going forward we have decided to use a plugin called “Code Snippets” to manage supreme theme custom codes. So your code changes won’t get lost when you upgrade

    https://wordpress.org/plugins/code-snippets/

    So please install that plugin, activate it.

    Add the code added by me above and then activate it.

    Let me know if it doesn’t work.

    Thanks

    #239057

    sylvester vader
    Buyer
    Post count: 151

    it works perfect however the links where not correct

    it now goes to location/link
    but then it misses information sometimes
    for example when you click on the city
    then the site dont find the country 😛 or region

    so i changed the snippet to

    
    
    function sd_permalink_city_name($name, $post) {
        $location_link = geodir_get_location_link('base');
        if ( get_option('permalink_structure') != '' ) {
    	    $location_link .= $post->country_slug;
    	     $location_link .= '/';
    	    $location_link .= $post->region_slug;
    	     $location_link .= '/';
            $location_link .= $post->city_slug;
        }
        else {
            $location_link .= '&gd_country='.$post->country_slug.'&gd_region='.$post->region_slug.'&gd_city='.$post->city_slug;
        }
        return '<a href="'.$location_link.'">'.$name.'</a>';
    }
    add_filter( 'sd_detail_city_name', 'sd_permalink_city_name', 10, 2 );
    
    function sd_permalink_region_name($name, $post) {
        $location_link = geodir_get_location_link('base');
        if ( get_option('permalink_structure') != '' ) {
    	   $location_link .= $post->country_slug;
    	     $location_link .= '/';
    	    $location_link .= $post->region_slug;
        }
        else {
            $location_link .= '&gd_country='.$post->country_slug.'&gd_region='.$post->region_slug;
        }
        return '<a href="'.$location_link.'">'.$name.'</a>';
    }
    add_filter( 'sd_detail_region_name', 'sd_permalink_region_name', 10, 2 );
    
    function sd_permalink_country_name($name, $post) {
        $location_link = geodir_get_location_link('base');
        if ( get_option('permalink_structure') != '' ) {
            $location_link .= $post->country_slug;
        }
        else {
            $location_link .= '&gd_country='.$post->country_slug;
        }
        return '<a href="'.$location_link.'">'.$name.'</a>';
    }
    add_filter( 'sd_detail_country_name', 'sd_permalink_country_name', 10, 2 );

    good idea the code snippets

    #239058

    Giri
    Expired Member
    Post count: 3155

    I’m glad it works. 🙂

    #239069

    sylvester vader
    Buyer
    Post count: 151

    im learning alot from al the addons and changes you guys put in forum

    #239277

    Giri
    Expired Member
    Post count: 3155

    Nice to hear that sylvester. Feel free to open new threads if you need help

    Thanks

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