• nando99

    (@nando99)


    I currently have my links like this /%postname%/ –

    I’d like to change them to this /%post_id%/%postname%/ (because I read that it helps the site load faster).

    Is there way to have /%postname%/ links (on other sites) automatically redirect to the /%post_id%/%postname%/ links?

    Thanks in advance,

    nando

Viewing 15 replies - 16 through 30 (of 30 total)
  • Thread Starter nando99

    (@nando99)

    actually… it doesnt work… like, it redirects but to a specific post every time…. post with id 17729… thats extremely weird…

    Thread Starter nando99

    (@nando99)

    actually… all 404s are redirecting to that post…

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    šŸ³ļøā€šŸŒˆ Advisor and Activist

    Are you using caching?

    That means that something must be wrong in the get_posts() arguments I provided. I’ll try to take a look at that later to see what might be going on with it.

    Thread Starter nando99

    (@nando99)

    cool thanks curtiss…

    isstenu, i was, but i disabled the plugin

    thanks again, for the help!

    Thread Starter nando99

    (@nando99)

    ipstenu**

    Let’s try this again. I was using the wrong parameters in the get_posts() function (post_name should have been name and posts_per_page should have been numberposts), so WordPress was ignoring both of those parameters and just running a general query for posts.

    Here is some updated code that appears to do what it should http://pastebin.com/5jD9nxLj

    Let me know if this works for you.

    Thread Starter nando99

    (@nando99)

    nope… now 404s redirect to another random post…

    That’s really strange. I’ll have to set up a test site with parameters similar to what you have set up and see if I can figure out what the issue is.

    Thread Starter nando99

    (@nando99)

    yeah… thanks for your help, really appreciate it…

    There’s something funky going on. I just set up a new test environment and set it up with the same permalink settings you indicated above, and it worked out of the box without me having to add the 404 code I’d been working on.

    If you visit http://wp-testing.ten-321.com/another-post-with-everything-in-it/ you’ll see that it automatically redirects to http://wp-testing.ten-321.com/56/another-post-with-everything-in-it/

    I am using the standard TwentyTen theme with no plugins or modifications on that site.

    I wonder if something in either your theme or one of your plugins is stopping that functionality from working properly.

    Thread Starter nando99

    (@nando99)

    i’m using version 2.9.1… and i’m also using that remove category from the url plugin… thoughts?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    šŸ³ļøā€šŸŒˆ Advisor and Activist

    Odds would be the remove cat plugin. But also you’re two revs back, man. You should upgrade if you can.

    Thread Starter nando99

    (@nando99)

    yeah, i really cant upgrade right now… extremely customized and i dont have the time to start from scratch on the newest version…

    as soon as i get a chance i’m going to install a new instance of it with no plugins and see if it works or now..

    Thread Starter nando99

    (@nando99)

    or not*

    thanks for all the help – its greatly appreciated…

Viewing 15 replies - 16 through 30 (of 30 total)

The topic ‘Changing Permanent Links’ is closed to new replies.