Category : wp-nav-walker

I’m trying to add div to wrap all submenus inside. WordPress by default creates menu structure: <ul id="menu-main" class="menu"> <li>Parent <ul class="sub-menu"> <li>Sub <ul class="sub-menu"> <li>Sub 1A</li> <li>Sub 1B</li> </ul> </li> <li>Sub 2 <ul class="sub-menu"> <li>Sub 2A</li> <li>Sub 2B</li> </ul> </li> </ul> </li> </ul> I would like to add div to wrap all submenu into ..

Read more

So I’m having some issues and I can’t figure out how to solve them, I’ve recently started working with WordPress navwalkers and I’m stuck on a particular piece and I can’t figure out how to get around it. So I am using the Bulma Framework inside a wordpress theme. Here is what I’m attempting to ..

Read more

I’m trying to build my own Walker_Nav_Menu class for a vertical sidebar menu inside my WordPress Theme. I’m using Bootstrap 4 as a Framework. My goal is to build something like the following html with the Walker class. <div id="accordion"> <ul> <li> <a href="#" class="custom-class" id="indiceheading-1" data-toggle="collapse" data-target="#indicecollapse-1" aria-expanded="true" aria-controls="indicecollapse-1"> Link 1 but it’s an ..

Read more

I’ve been trying to learn how to create new WordPress themes using Roots Sage, bedrock and trellis. I’ve incorporated navwalker (https://github.com/wp-bootstrap/wp-bootstrap-navwalker) into my project to be able to use the bootstrap styling with the navbar. The code used for my header.blade.php is as follows <header class="banner"> <nav class="navbar navbar-expand-md navbar-dark bg-dark" role="navigation"> <div class="container"> <button ..

Read more

I’m new to PHP and trying to get my head around the walker class. I need to create a navigation with the following markup structure. <div class="learn"> <div class="learn-header"> <span><b>Learn A</b> (16-19)</span> <i class="fa fa-plus-circle"></i> </div> <div class="learn-content"> <a href="#">A</a> <a href="#">B</a> <a href="#">C</a> <a href="#">D</a> <a href="#">E</a> </div> </div> <div class="learn"> <div class="learn-header"> <span><b>Learn ..

Read more