Forums

How to remove "/category/" from permalinks? (4 posts)

  1. misterm2009
    Member
    Posted 2 years ago #

    Hi

    I have permalinks enables and have set /%category%/%postname%/ as my custom stucture.

    This is causing the word "category" to appear in my urls when I browse to a category like thus:

    http://www.mysite.co.uk/category/art-and-crafts/

    when really I just want:

    http://www.mysite.co.uk/art-and-crafts/

    the word "category" then dissapears when I navigate to a post:

    http://www.mysite.co.uk/art-and-crafts/new-paintings

    Does anyone knwo how to get rid of "category" from the URL?

    many thanks

    D

  2. Dagon Design
    Member
    Posted 2 years ago #

    Change the permalink structure from this:

    /%category%/%postname%/

    To this:

    /%postname%/

  3. BPartch
    Member
    Posted 2 years ago #

    From the codex: http://codex.wordpress.org/Using_Permalinks#Using_only_.25postname.25

    %postname%
    A sanitized version of the title of the post (post slug field on Edit Post/Page panel). So “This Is A Great Post!” becomes this-is-a-great-post in the URI (see Using only %postname%). Starting Permalinks with %postname% is strongly not recommended for performance reasons.

    I have had issues doing it that way, such as previous/next links not working anymore and I cannot remember what else.

    I found this but have not tested it: http://www.wprecipes.com/how-to-remove-category-from-your-wordpress-url

    There are also plugins.

    http://wordpress.org/extend/plugins/wp-no-category-base/
    http://wordpress.org/extend/plugins/pathless-category-links/

    Off Topic: Thanks for the great Sitemap plugin Dagon Design

  4. Dagon Design
    Member
    Posted 2 years ago #

    BPartch: Nice work - I did not remember that it was not recommended :) Glad you like my plugin!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.