I’d like to have a page when i click one of the items in the menu of my theme but nothing is responding.However, when i hover the menu items, the page id’s tend to show. Note am using a plugin for WordPress theme development named Timber.

So in my index.php i have the following;

    $context = Timber::get_context();
$menu_id = get_term_by('slug','menu','nav_menu')->term_id;
//$menu    = new TimberMenu(3);
$context['menu'] = new TimberMenu($menu_id);
$query   = array(
    //'numberposts' => 3,
    'category_name' => 'News',
$product = array('category_name' => 'Products');
$context['products'] = Timber::get_posts($product);

$context['news'] = Timber::get_posts($query);

$templates = array('index.twig');

if (is_home()) {
    array_unshift($templates, 'home.twig');

For the front end for the menu,i have the following;

    {% if menu %}
    <ul class="nav navbar-nav">
        {% for item in menu.get_items %}        
        <li class="{{item.classes | join(' ')}}">
             <a href="{{item.get_link}}" data-toggle="dropdown">{{ item.title }} </a>
          {% endfor %}
   </ul><!--/ Nav ul end -->
{% endif %}

Read more here: Menu items in menu not clickable/ or not working when clicked in WordPress using Timber plugin for theme development


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: