-
AuthorPosts
-
February 19, 2020 at 1:22 pm #1186015
Hi,
I’m trying to change the title of my home in the breadcrumb menu to a custom title and found the following code in one of the older posts. Since I’m working on a bilingual page using polylang, I’d like to know how I’d do this for both German and English. What do I need to add to the code before placing it in the functions.php?
add_filter( 'avia_breadcrumbs_trail', 'avia_breadcrumbs_trail_mods', 50, 2 ); function avia_breadcrumbs_trail_mods( $trail, $args ) { $hometitle = 'Custom Title'; if ( is_front_page() ) return; $trail[0] = '<a href="' . $homeurl . '" title="' . esc_attr( get_bloginfo( 'name' ) ) . '" rel="home" class="trail-begin">'. $hometitle .'</a>'; return $trail; }
I’d appreciate your help.
February 20, 2020 at 5:35 pm #1186426Hey tebitron gmbh,
This line:
$hometitle = 'Custom Title';
should be to be translatable
$hometitle = __( 'Custom Title', 'avia_framework'));
Best regards,
VictoriaMarch 18, 2020 at 1:12 pm #1194096Thanks Victoria,
you’re a dime!
Is there a way to give both English and German Homepages the same hierarchy in terms of breadcrumbs?
German is fine and says:
Sie sind hier: StartseiteEnglish says:
You are here: Homepage / Felke InstituteCan you make the English look like this:
You are here: HomepageOr is this something that has to do with the Polylang settings?
- This reply was modified 4 years, 8 months ago by tebitrongmbh.
March 19, 2020 at 6:27 pm #1194501Hi tebitrongmbh,
It should be the same.
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaMarch 20, 2020 at 10:53 am #1194760Hi Victoria,
thanks for getting back.
Please find the details below.
Kind regards.
March 25, 2020 at 12:52 pm #1197659Hi,
Sorry for the late reply!
I believe this is related to plugin settings. I added following code to Style.css file of your child theme to delete it using CSS
html[lang="en-GB"] .page-id-376 .trail-begin, .breadcrumb-trail .sep:nth-child(3) { display: none !important; }
Please review your website :)
Best regards,
YigitMarch 25, 2020 at 1:38 pm #1197671Thanks Yigit!
You guys rock!
March 25, 2020 at 2:32 pm #1197678Hi,
You are welcome! :)
For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/
If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)
Best regards,
Yigit -
AuthorPosts
- The topic ‘Custom Breadcrumb Title for Home [German+English]’ is closed to new replies.