Sorry to keep you guys busy with this
Ok i just received a mail saying you guys will give it one more shot, thank you for this!!!
Ok this part of code works like a charm:
foreach ( $crumbs as $i => $crumb ) {
if ( $crumb['label'] === 'Blog' ) {
$crumbs[$i]['label'] = 'Nieuws & Trends';
$crumbs[$i]['url'] = 'https://jittysamsterdam.com/nieuws-trends/';
}
}
This part of code works also like a charm,
add_filter('x_breadcrumbs_data', 'post_parent_trail', 9999999, 2);
function post_parent_trail ($crumbs, $args) {
if ( is_singular('post') ) {
$category = get_the_category( get_the_ID() );
if ( count( $category ) > 0 ) {
$crumbs[1]['label'] = $category[0]->name;
$crumbs[1]['url'] = get_category_link( $category[0]->term_id );
unset($crumbs[2]); //to make sure category won't duplicate
}
}
return $crumbs;
}
So individually both set of codes do exactly what they supposed to do. The last attempt to combine these two results in failures
If you need any more info on this let me know,
Thousand thanks!!!