Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #492396

    Hi,

    the breadcrumb structure is wrong on my site.

    I want it like this: Home -> %category% -> %postname%
    The WordPress permalink settings are: /%category%/%postname%/

    But the following structure appears: Home -> %postname% -> %category% -> %postname%

    How can I fix this? Bug or feature?

    #492710

    Hi Carsten!

    Thank you for using Enfold.

    This is a bug. The breadcrumb should not duplicate the post name. Did you add any modifications in the theme? Please check the functions.php file, maybe you added a filter for avia_breadcrumb_trail.

    Regards,
    Ismael

    #493096

    Hi Ismael,

    thanks for your answer.

    The only modifications I made are:

    add_theme_support('avia_template_builder_custom_css');
    
    add_filter ('avia_post_nav_settings', 'enfold_customization_same_cat');
    function enfold_customization_same_cat ($s) {
      $s['same_category'] = true;
      return $s;
    }
    
    add_filter( 'nav_menu_css_class', 'add_custom_class', 10, 2 );
    function add_custom_class( $classes = array(), $menu_item = false ) {
        if ( is_single() && in_category( 'wissen' ) && 71 == $menu_item->ID && ! in_array( 'current-menu-item', $classes ) ) {
            $classes[] = 'current-menu-item';
        }
        return $classes;
    }

    The same problem exists at my blog posts. Is this – in my eyes – uncommon permalink setting causing the issue?

    %category% -> %postname%

    #493488

    Hey!

    Please try to add this in the functions.php file:

    add_filter( 'avia_breadcrumbs_trail', 'avia_breadcrumbs_trail_mod', 50, 2 );
    function avia_breadcrumbs_trail_mod( $trail, $args ) {
    	
    	if ( is_single() ) {
    		unset($trail[1]);		
    	}	
    	return $trail;
    }

    Cheers!
    Ismael

    #493707

    Hey Ismael,

    thank your very much. That just works!

    Another question: The breadcrumb links of “Blog” and “Wissen” lead to the corresponding category pages.

    Is it possible to change that to the pages “Blog” / “Wissen”?

    #495707

    Hey!

    I think a plugin like this could help you achieve that: https://wordpress.org/plugins/top-level-cats/

    Hope this helps!

    Best regards,
    Andy

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.