Support » Fixing WordPress » rewrite menu url for one page website

  • Resolved Sabrin_N

    (@sabrin_n)


    Hi,

    i want a one page website.

    this is what i have so far to get the menu items (that are the pages so nog posts) with a # in front of the name:

    <?php echo str_replace('<a>

    So this works. But. when i click on the link it doesn’t go the the section. I does work when i put it manually at #about so with the bloginfo infront of it it doesn’t work anymore.

    I know that i can fix it with a custom menu, but i only want that if i can get the current_page_parent etc in it (which disappears when you have a custom menu)

    thank you

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

    (@sabrin_n)

    <?php echo str_replace('<a href="bloginfo("url")/','<a href="bloginfo("url")/#', wp_list_pages('title_li=&echo=0')); ?>

    this is the code 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘rewrite menu url for one page website’ is closed to new replies.