• Hi there all,

    I have wordpress setup as a cms for my website. So each time you add a new menu in the admin area it uses my custome theme to add a page to my website where i can edit the text content within wordpress.

    I have issues with my menu for my website. I want the address bar to show the page name not the current ? and numbers etc.

    I changes my permalinks to /%category%/%postname%/

    Here is my menu code:-

    [code]
    <ul id="mainNav">
    <li <?php if (is_page('Home'))
    {
    echo " id=\"current\"";
    }?>>
    /" accesskey="H" title="Home">Welcome

    <li <?php if (is_page('restaurant'))
    {
    echo " id=\"current\"";
    }?>>
    /restaurant" accesskey="R" title="Restaurant">Restaurant

    [/code]

    This doesn’t work – any ideas how to make my menu work and highlight the link if that page is active?

    thank you any other information needed give me a shout – im new to this wordpress and fairly new to php!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Froggy,
    As far as I know you don’t have to do anything. The Menu generated by wordpress with wp_list_pages already is dynamic. It marks the current page with the tag “current_page_item”. You can style it then as you like.

    You can also read THIS to help you.

    Anja

    Thread Starter froggy_frog

    (@froggy_frog)

    I have followed the instructions in method 2 of the link – thank you.

    When I view my wordpress website and click on the link to restaurant for example the address bar changes to https://127.0.0.1/WordpressCMS/wordpress/restaurant as I wanted it to do.

    However the webpage cannot be seen – object not found.

    Is this to do with my permalinks?

    When I go to edit that page it shows the permalink as:- https://127.0.0.1/WordpressCMS/wordpress/restaurant

    However when I try to view the page here it cannot be found either.

    How to I get wordpress to create the page names as restaurant? The pages are all created dynamically.

    thank you

    Hey froggy.
    It seems you don’t have the mod_rewrite enabled. As your call goes to your local IP, I assume you have your own server running. Which makes it easy for you to turn it on.

    Find httpd.conf in Apache conf directory and uncomment (remove #) a line which looks something like this:

    #LoadModule rewrite_module modules/mod_rewrite.so

    Good Luck
    Anja

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘dynamic page menu’ is closed to new replies.