• Resolved budlix

    (@budlix)


    Hello,
    last days I am confused from trying remove menu list of pages (div.menu) from my posts page.

    I’m using BlankSlate theme and for menus I added function for MenuName, so I can have different menu on each page where MenuName is (custom field).

    Everything works fine except posts page, where is still showing list of pages I have created in wp.

    It looks like the posts page is “computed” different than other pages, so it ignores MenuName or what..

    Here is my posts page test:
    http://test.budlix.cz/blog/ (my static page named blog have MenuName custom field, same as here, where it works fine: http://test.budlix.cz/)

    Here is page with menu called with MenuName through custom field.
    http://test.budlix.cz/t-shirt/

    Please note: Main menu is hard-coded, what I’m solving is secondary menu which is different on each page or is not showing.

    Thank you very much for any response!

Viewing 1 replies (of 1 total)
  • Thread Starter budlix

    (@budlix)

    SOLVED

    This was my process:

    File: header.php
    Original Code Line: <?php wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); ?>
    Revised Code Line: <?php wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’, ‘menu’ => get_post_meta( $post->ID, ‘MenuName’, true) ) );?>
    Also: “Then create a new custom field called MenuName and give it a value matching the name of the menu you want that page to use.”

    Solved – just moved code from header.php into page.php

Viewing 1 replies (of 1 total)
  • The topic ‘Remove menu from blog page (posts page)’ is closed to new replies.