Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1360856

    Hello
    i am sure thats a question thats been asked very often.

    I am not working with categories.
    I use “pages –> masonry elemt” to show a grid view of my blogposts.
    But the breadcumb links are still pointing to “You are here: Home / Category / Post”
    It needs to be: “You are here: Home / Link to the page with the masonry / Post”

    There must be some kind of php for the functions to solve that.
    How does it look like?

    Eva Simone

    #1361036

    Hey evas49,

    Thank you for the inquiry.

    That is actually the correct breadcrumb trail for the post if the page containing the masonry element is not assigned as the main blog page. If you want the breadcrumb to link back to the masonry page, try to set it as blog page in the Enfold > Theme Options panel.

    We can use the avia_breadcrumbs_trail filter to adjust the breadcrumb but we recommend setting the masonry page as blog page instead.

    Usage example of the avia_breadcrumbs_trail filter below.

    add_filter( 'avia_breadcrumbs_trail', 'avia_breadcrumbs_trail_mod', 50, 2 );
    function avia_breadcrumbs_trail_mod( $trail, $args ) {
    	// remove duplicate events trail
    	if ( is_singular('post') {
    		unset ($trail[1]);
    	}
    	return $trail;
    }
    

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Wrong links in breadcrumb when using masonry’ is closed to new replies.