|
|
@@ -96,11 +96,13 @@ class wp_bootstrap_navwalker extends Walker_Nav_Menu {
|
|
|
|
|
|
$atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args );
|
|
|
|
|
|
+ $postID = get_post_meta( $item->ID, '_menu_item_object_id', true );
|
|
|
+
|
|
|
$atts['class'] = "nav-link scroll-link"; // MY EDIT
|
|
|
$atts['data-target'] = ltrim($atts['href'], '/');
|
|
|
$atts['href'] = ltrim($atts['href'], '/');
|
|
|
- if(!is_front_page() && (strpos($atts['href'], 'http') !== 0)) {
|
|
|
- $atts['href'] = "/index.php" . $atts['href'];
|
|
|
+ if(is_front_page() && (in_category("Startseite", $postID))) {
|
|
|
+ $atts['href'] = "#post-" . $postID . "-jumper";
|
|
|
}
|
|
|
|
|
|
$attributes = '';
|