Support » Themes and Templates » adding anchors to get_page_link

  • As the title says i want to add anchors to my page links in my bootstrap menu.

    <?php wp_list_pages(array(
         'title_li' => '',
         'link_after' => '<?php get_page_link($id);?>' ,
         'exclude'      => '35, 215, 121, 5')); ?>

    The anchors need to be the same name as the title, for example if i click the “contact” menu item it should generate this.

    <a href="http://Some">

    So it takes me to the next page then to the anchor #contact which will be a div i am generating on that page.

    Anyone got any ideas how i would add the anchors to my list pages links?

  • The topic ‘adding anchors to get_page_link’ is closed to new replies.