I’ve tried many css entries in the menu structure box, but no luck yet…
Hi Sientje,
To hide a page from the menu and leave the page visible when scrolling on the DW Page, please follow my instruction here:
Step1: open the framework.php file in the folder path “wp-content\themes\dw-page-modern\inc”
Step2: Find the line from 307 to 327 then replace the following code:
foreach ($menu as $menu_item) {
$active = $i == 0 ? 'class="active"' : '';
$menu_id = sanitize_title($menu_item->title);
?>
<li <?php echo $active ?>>
<a href="#<?php echo $menu_id ?>">
<?php echo $menu_item->title ?>
</a>
</li>
<?php
$i++;
}
?>
</ul>
</div>
<?php
}
}
}
With the new code:
foreach ($menu as $menu_item) {
$active = $i == 0 ? 'class="active"' : '';
$menu_id = sanitize_title($menu_item->title);
if ($menu_item->menu_item_parent == 0) :
?>
<li <?php echo $active ?>>
<a href="#<?php echo $menu_id ?>">
<?php echo $menu_item->title ?>
</a>
</li>
<?php
endif;
$i++;
}
?>
</ul>
</div>
<?php
}
}
}
See the screenshot:
Step3: Log in to Dashboard > Appearance > Menu then move the menu that you want to hide.
Example:
- Portfolio
– Team
See the screenshot:
Hope this helps!
Excellent Information.
Is there a way to not have the parent menu text highlight when scrolling through these sections?
To resolve this issue. Please add the following code to the style.css file
.navbar .nav > li > a, .navbar .nav > li > a:active, .navbar .nav > li > a:focus {
color: #000;
}
but what if its the first page in the menu you want to hide?
you can add the following code to the Header Code (Dashboard > Customize > Custom Code)
Regards,
It works, woordatelier.nl. The only thing is when using links with anchors, the title isn’t visible. Can i use code in a title? But thank you for your theme en time!
Currently, Our DW Page does not yet support use code in a title.
Please login or Register to submit your answer