• Hi all,

    I’m trying to optimize the permalink structure of my website following the advice I’ve found on a good article (http://ottopress.com/2010/category-in-permalinks-considered-harmful/).

    As far as I understand it’s a good idea to put something static, like a number, before anything else in the permalink.

    The problem is that my website is made of pages because it’s not time sensitive data. I have created custom taxonomies and the menu gets populated very easily because it falls back to wp_page_menu(). Now, tags like /%year%/%postname%/ or /%post_id%/%postname%/ or /%page_id%/%postname%/ are not working in the permalinks settings. The pages just keep coming up like mydomain.com/name-of-the-page/. No number… 🙁

    I would really mind to change the structure of my contents and move to posts or custom post types, just for this rewrite rule optimization issue. There must be a way to get a number before the names of the pages as well?

    Big thanks in advance for any help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter svedish

    (@svedish)

    Any chance someone knows about this issue? I was hoping for Otto to jump in?

    Sorry and thanks again.

    Thread Starter svedish

    (@svedish)

    Hi guys,

    I see no one participated to this thread, which is a shame, but I did some research and, even though I’m not sure I got a totally conclusive answer, I have some information that I think is useful to share, just in case someone stumbles upon my same problem and needs help with it.

    Through his blog, in the comments to the article that points out the issue of *poor* permalinks strings and performance, Otto kind of answered my question.

    Essentially the Custom (permalink) Structure (where you can type the string of your choice) apparently applies ONLY to posts, therefore pages, if you have rewrite ON, will always be named according to the title of the page in the URL, like domain.com/name-of-page/. The problem seems to be that if you have a bad structure (only %postname% for instance) WordPress will struggle to differentiate between posts and pages and will start adding lots of internal ‘notes’ to the Data Base (in particular the wp-options table in the rewrite_rules record).

    So, if you have a website made of lots of pages and a BAD permalink string, the problem starts to increase the bigger the website becomes. If you use a good permalink structure (which eliminates any doubt about what that URL refers to (like /%post_id%/%postname%/) even if this applies only to posts – and not pages – this is sufficient to scale up the website quite considerably without problems.

    This is that I understood by reading a couple of articles and most comments underneath. Hope this helps someone because performance is crucial. Slow websites turn users away.

    ** Of course, it’s still to be understood for me if it’s a good thing that the engine looks through the DataBase following alphabetical indexes as opposed to numerical ones (e.g. title-of-my-page) but I like to use pages for non time sensitive data, and I like the idea of making small sites with WordPress, so I guess I’ll stick to it as far as the DataBase doesn’t get bloated because of lots of rubbish **.

    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding a static element also before PAGES in permalinks’ is closed to new replies.