• nicolehar

    (@nicolehar)


    Hi all,
    I am trying to establish how to achieve this URL structure on my wordpress site:

    With permalinks set to /%postname%/ I currently have:

    URL/category/subcategory/post and
    URL/page/subpage

    I would like to acheive:
    URL/subcategory
    URL/subpage

    but in these two instances, I cannot remove the top level category or top level page.

    Any thoughts?? Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • ptang

    (@ptang)

    You could try the following plugin, if you haven’t already. Sounds like it might be able to help you…

    http://wordpress.org/extend/plugins/hikari-category-permalink/

    As an aside, the following (from the codex) may be of interest to you:

    For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields. The reason is that these are text fields, and using them at the beginning of your permalink structure it takes more time for WordPress to distinguish your Post URLs from Page URLs (which always use the text “page slug” as the URL), and to compensate, WordPress stores a lot of extra information in its database (so much that sites with lots of Pages have experienced difficulties). So, it is best to have at least two path segments in your post’s permalink structure such as /%year%/%postname%/ or even /posts/%postname%/.

    Finally, I assume you wrote your desired permalink examples the way you did to keep them concise within your question, but just in case you didn’t, you will probably want to end your permalinks with either %post_id% or %postname%. From the same source as above (i.e. the official docs):

    Make sure to end your structure with either %post_id% or %postname% (e.g. /%year%/%monthnum%/%day%/%postname%/) so that each permalink points to an individual post.

    Hope this helps…

    Thread Starter nicolehar

    (@nicolehar)

    Ptang: thanks for your response – but this is not really the solution i am looking for.

    My issue is not with the category being displayed with each post/page – (i have my permalinks set so that it displays as URL/postname so the category selection is irrelevant.

    The issue comes from sub category and sub pages – i want to only display THAT category name without the parent showing as well.

    currently URL renders as: http://www.mysite.com/parent-category/sub-category

    I want: http://www.mysite.com.au/sub-category

    Thanks

    Hi Nicolear,

    Did you ever find a solution/plugin/code for this problem? I too want to be able to set the URL structure for any given page/post so I can decide if a sub page resides one level up for example.

    Any response or feedback would be greatly appreciated.

    Many thanks, Sahus

    Thread Starter nicolehar

    (@nicolehar)

    HI Sahus,

    Unfortunately not – i just had to live with it the way it was 🙁

    If you manage to find a solution, please post it here!

    Thanks,
    Nicole

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

The topic ‘Custom URL structure’ is closed to new replies.