WordPress.org

Ready to get started?Download WordPress

Ideas

Remove 'Category Base' From Permalinks

  1. nateomedia
    Member

    12345

    fil — I downloaded your plugin and am hoping to give it a test drive soon. I hope it still works with 2.1. thanks!

    Posted: 7 years ago #
  2. Asbjørn Ulsberg
    Member

    12345

    The way WordPress handles the URI space is really obscure. Instead of defining a set of global rules that are used each and every time an URI is parsed and the accompanying category, page or post is supposed to be shown, there seems to be at least three completely independent code paths that finds the requested resource. It doesn't make any sense.

    Instead, everything requestable resource in WordPress should have its own URI, minted on the time of creation. A "slug" isn't enough; it doesn't give the author enough control. I'm not saying the author should hard-code the URI of a resource each and every time, but there should be an algorithm for minting the URI of a resource that is the same for all resources. And with resource, I mean "post", "page", "category", "archive" and all other named entities in WordPress.

    That the category listings needs to be prefixed with "category" or some other special value is just dumb. I understand the need for it with WP's current URI architecture, but frankly, the current URI architecture is broken and needs to be fixed.

    Doing some work to define a set of rules to apply on the creation of all resources in WP would fix that problem. In any case, if the rules seems insufficient, they can easilly be expanded and appended upon for a next release of WP. The same PHP function should handle it at least. So, when this is in place, each resource would have a hard-coded URI in the database that allows for easy lookup when it's supposed to be retreived. No need to parse the URI to find out what parts it consists of, etc.

    Posted: 7 years ago #
  3. nateomedia
    Member

    12345

    Just thinking but, really, how bad would it be if Pages and Posts just couldn't have the same names? Then, both could co-exist in peace and harmony.

    Posted: 7 years ago #
  4. siounis
    Member

    http://wordpress.org/support/topic/98005?replies=20#post-559775

    Blizcreak got it working!

    Transcript:
    Solved!

    Here is the solution:

    install this plugin:
    http://fortes.com/projects/wordpress/top-level-cats/

    Use the permalink structure: /%category%/%postname%.html
    set base category as 'category' (or anything else)

    It won't work without the html on the end.

    works like a dream!

    Noel

    Posted: 6 years ago #
  5. nateomedia
    Member

    12345

    The issue is still unresolved. The plugin mentioned above does not entirely fix the problem. For instance, if a site were to use Keyvan Minoukadeh's Paged Comments plugin with Fancy URLs turned on, it would be possible to end up with permalinks that look like this:

    http://www.site.com/category/subcategory/posttitle.hml/comment-page-9/

    Having ".html" in the url is awkward and, for me at least, not the ideal solution to this issue.

    Posted: 6 years ago #
  6. harriscampbell
    Member

    12345

    Add my vote to this one. I tried the plugin and it didn't work for me, and I'm also unhappy with the ".html" workaround.

    Posted: 6 years ago #
  7. SpencerLavery
    Member

    12345

    Agreed, this is massively important for the way I use WP.

    Posted: 6 years ago #
  8. dopecoder
    Member

    Hi

    see this 5 step tutorial that tells you how to remove category base from permalinks. Please note this is only for wordpress 2.0+
    http://bloggerholic.com/wordpress/how-to-remove-category-base-from-permalinks-45.htm

    Posted: 6 years ago #
  9. nateomedia
    Member

    12345

    Useful info, I guess, but this section is for proposing ideas for ways that WordPress can be improved. Hacks like yours are hard to maintain through maintenance upgrades and, if the problem really is so easily solved as your hack implies, then it should be fixed properly.

    Posted: 6 years ago #
  10. Charbax
    Member

    12345

    So I guess this still doesn't work?

    I installed http://fortes.com/2007/06/20/top-level-categories-plugin-10/ and it seems to be very close to working!

    You can check out my install of the Top Level Categories plugin at http://techvideoblog.com

    The only problem I see that there is is this example:
    http://techvideoblog.com/pmp/page/4/ (wordpress doesn't recognize it is on page 4 of the pmp category, as you can see by the pagenavi and hitting the previous or next page links)
    While this kind of manually URL works fine http://techvideoblog.com/pmp/?paged=4 Other than previous and next page links as well as the pagenavi links to /page/pagenumber/ so it breaks it again.

    Anyone have an idea if this Top Level Categories plugin could be fixed?

    I guess that if there was a way to force ?paged=4 type of links instead of /page/4/ then this would work? Anyone knows how to force that kind of ?paged=4 navigation while keeping nice permalinks for the rest?

    Posted: 6 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    12345
    157 Votes
  • Status

    This is plugin territory