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-
AuthorPosts
-
July 30, 2016 at 6:33 pm #237220
Hi im wodering if there is a way to make address texts in listings clickable
like clickable breadcrums
July 31, 2016 at 1:48 pm #237570That 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.
July 31, 2016 at 6:25 pm #237613yes what i would like is that spain has a link that goes to location/spain/
so on and so oncity 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
August 1, 2016 at 2:47 pm #238233Hi,
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
August 2, 2016 at 10:08 am #238951Hi 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 );
August 2, 2016 at 11:42 am #239002This reply has been marked as private.August 2, 2016 at 12:27 pm #239008Hi 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
August 2, 2016 at 12:57 pm #239057it 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 regionso 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
August 2, 2016 at 12:59 pm #239058I’m glad it works. 🙂
August 2, 2016 at 1:16 pm #239069im learning alot from al the addons and changes you guys put in forum
August 2, 2016 at 5:00 pm #239277Nice to hear that sylvester. Feel free to open new threads if you need help
Thanks
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket