• Hi all,

    I’m still pretty new to wordpress so please be gentle.

    I am looking to update the way I link to pages on my site. I want to use the <?php echo get_permalink(1); ?> function. This way if I change my permalink structure, for any reason, I don’t have to trawl through all my old posts and pages to update all the links. Does anyon know how I can find out all the permalink numbers and which page/post they relate to?

    Thanks,
    Harry.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi

    I need to now this also as I have chnged the structure of my links now all the links on my site are broke so I need to link them all. Don’t fancy editing every single one so need a quick solution

    Thread Starter SB_beginner

    (@sb_beginner)

    I’ve found out how to do it. It’s a bit of a pain but it works.

    Goto your dashboard, load the posts or pages section, hover over the post/page title and you’ll see the number in the link on the status bar at the bottom.

    You can do this or just change your permalink structure to “default” does this code work <?php echo get_permalink(1); ?> and you change the number to whatever page you want it to go to, is it a plug-in?

    Thread Starter SB_beginner

    (@sb_beginner)

    you need a plugin that allows you to insert php into pages and posts. I use PHP Execution plugin.

    Once you have the plugin installed you can replace your links with

    <a href ="<?php echo get_permalink(269); ?>">New page</a>

    Obviously you need to know the numbers for each of your pages and posts.

    Thread Starter SB_beginner

    (@sb_beginner)

    Sorry yes just change the number to the page/post you want to link to

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Where can I get my permalink numbers’ is closed to new replies.