Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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.

    #1186426

    Hey tebitron gmbh,

    This line:

    
    	$hometitle = 'Custom Title';
    

    should be to be translatable

    
        $hometitle =  __( 'Custom Title', 'avia_framework'));
    

    Best regards,
    Victoria

    #1194096

    Thanks 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: Startseite

    English says:
    You are here: Homepage / Felke Institute

    Can you make the English look like this:
    You are here: Homepage

    Or is this something that has to do with the Polylang settings?

    • This reply was modified 4 years, 8 months ago by tebitrongmbh.
    #1194501

    Hi 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,
    Victoria

    #1194760

    Hi Victoria,

    thanks for getting back.

    Please find the details below.

    Kind regards.

    #1197659

    Hi,

    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,
    Yigit

    #1197671

    Thanks Yigit!

    You guys rock!

    #1197678

    Hi,

    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

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Custom Breadcrumb Title for Home [German+English]’ is closed to new replies.