Title: get_permalink()
Last modified: June 10, 2019

---

# get_permalink()

 *  Resolved [erinreed](https://wordpress.org/support/users/erinreed/)
 * (@erinreed)
 * [7 years ago](https://wordpress.org/support/topic/get_permalink-2/)
 * Hiya,
 * I’m trying to set up a new category (the school wear site) in the header. Because
   we have a custom theme, I’ve been using the theme editor. What I’m trying to 
   do is have that category take the user onto a new site. I’ve managed to create
   the category in the header but I cant figure out how to get a link on the editor.
 * This is the part of the code I’m having a problem with:
 *     ```
        <header class="lp">
               <div class="container">
                   <div class="row">
                       <div class="logo">
                           <a href="<?php bloginfo('url'); ?>"><img src="<?php bloginfo('template_directory'); ?>/assets/images/logo-lg.png" width="135" height="34" alt="<?= wp_title(); ?>" /></a>
                       </div>
                       <div class="navcont">
       		    <a href="<?= get_permalink(); ?>">THE SCHOOL WEAR SITE</a>
                           <a href="<?= get_permalink(126); ?>">ABOUT US</a>
                           <a href="<?= get_permalink(118); ?>">CONTACT</a>
                           <?/*<a href="javascript:;" class="nav-dropdown">MORE</a>*/?>
                           <a href="<?php bloginfo('url'); ?>#builder" class="order"><button>ONLINE QUOTE</button></a>
                       </div>
                   </div>
               </div>
           </header>
       ```
   
 * As you can see the get_permalink() for both about us and contact have numbers
   which I assume are retrieving the links from another page on those lines. But
   I can’t find the page with those links on the lines. Any advice would be great!
 * Kind regards.
    -  This topic was modified 7 years ago by [erinreed](https://wordpress.org/support/users/erinreed/).
    -  This topic was modified 7 years ago by [erinreed](https://wordpress.org/support/users/erinreed/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fget_permalink-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Stef](https://wordpress.org/support/users/serafinnyc/)
 * (@serafinnyc)
 * [7 years ago](https://wordpress.org/support/topic/get_permalink-2/#post-11622460)
 * I almost feel like you’re trying to add a custom link to the main menu or a widget
   menu?
 * You don’t need to add any code for this. Simply add a custom url link and add
   it to whichever menu you want.
 *  Thread Starter [erinreed](https://wordpress.org/support/users/erinreed/)
 * (@erinreed)
 * [7 years ago](https://wordpress.org/support/topic/get_permalink-2/#post-11622506)
 * Well I figured it out and I couldn’t do that because the header isn’t an actual
   menu therefor it wouldn’t have worked, thanks though.
 *  [Stef](https://wordpress.org/support/users/serafinnyc/)
 * (@serafinnyc)
 * [7 years ago](https://wordpress.org/support/topic/get_permalink-2/#post-11622632)
 * Oh the header is not dynamic wow. Super easy to make it dynamic if you ever need
   to. Here’s a decent [tutorial](https://wisdmlabs.com/blog/how-to-create-a-simple-and-dynamic-navigation-menu-in-wordpress/)
   should you ever want it to be.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘get_permalink()’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Stef](https://wordpress.org/support/users/serafinnyc/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/get_permalink-2/#post-11622632)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
