No Category Base (WPML)

Descrizione

As the name suggests this plugin will completely remove the mandatory ‘Category Base’ from your category permalinks ( e.g. ‘mysite.com/category/my-category/’ to ‘mysite.com/my-category/’ ).

The plugin requires no setup or modifying core wordpress files and will not break any links. It will also take care of redirecting your old category links to the new ones.

Funzionalità

  1. Better and logical permalinks like ‘mysite.com/my-category/’ and ‘mysite.com/my-category/my-post/’.
  2. Simple plugin – barely adds any overhead.
  3. Works out of the box – no setup needed.
  4. No need to modify WordPress files.
  5. Doesn’t require other plugins to work.
  6. Compatible with sitemap plugins.
  7. Compatible with WPML.
  8. Works with multiple sub-categories.
  9. Works with WordPress Multisite.
  10. Redirects old category permalinks to the new ones (301 redirect, good for SEO).

Screenshot (schermate di esempio)

  • Look Ma, No Category Base!

Installazione

  1. Upload the no-category-base-wpml folder to the ‘/wp-content/plugins/’ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. That’s it! You should now be able to access your categories via mysite.com/my-category/

FAQ

Why should I use this plugin?

Use this plugin if you want to get rid of WordPress’ “Category base” completely. The normal behavior of WordPress is to add ‘/category’ to your category permalinks if you leave “Category base” blank in the Permalink settings. So your category links look like ‘mysite.com/category/my-category/’. With this plugin your category links will look like ‘mysite.com/my-category/’ (or ‘mysite.com/my-category/sub-category/’ in case of sub categories).

Will it break any other plugins?

As far as I can tell, no. I have been using this on several site for a while and it doesn’t break anything.

Won’t this conflict with pages?

Simply don’t have a page and category with the same slug. Even if they do have the same slug it won’t break anything, just the category will get priority (Say if a category and page are both ‘xyz’ then ‘mysite.com/xyz/’ will give you the category). This can have an useful side-effect. Suppose you have a category ‘news’, you can add a page ‘news’ which will show up in the page navigation but will show the ‘news’ category.

Do I need WPML to use it?

No, you can use this plugin without having WPML installed.

Can you add a feature X?

Just ask on the support forum. If its useful enough and I have time for it, sure.

I get 404 errors when I deactivate the plugin. What can I do?

When you deactivate the plugin, you need to tell WordPress to refresh its permalink rules. This is easy to do.

Go to Settings -> Permalinks and then click on Save Changes.

Recensioni

Luglio 18, 2018
Newp. Ever since I installed this plugin and network-activated it on my WPMU site, our permalinks have been turning up broken REPEATEDLY. Found this on the topic in the support forum. This is a no-go for me. I'll go through and set the category slug to "." on every site I manage by hand before I'll have every one of those sites breaking multiple times a week.
Giugno 25, 2018
There are no settings. It just works. This really should be core, with an option to toggle and a function to 301 the old stuff.
Maggio 6, 2018
Return 404 from old url (with "category"). 404 is not bad for new sites, but for old it must be 301. Multisite. May be need to do somthing like this: $blog_id = get_current_blog_id(); if ( is_multisite() && $blog_id == 1 ) { $sitename = '/blog/'; } elseif ( is_multisite() && $blog_id !== 1 ) { $sitename = get_blog_details( $blogId )->path; } else { $sitename = '/'; } return $sitename; And then change "/" before "category" to "$sitename" in all urls.
Leggi tutte le recensioni di 24

Crediti e riconoscimenti

“No Category Base (WPML)” è un software open source. Le persone che hanno contribuito allo sviluppo di questo plugin sono indicate di seguito.

Collaboratori

Traduci “No Category Base (WPML)” nella tua lingua.

Ti interessa lo sviluppo?

Esplora il Codice segui il Repository SVN iscriviti al Log delle Modifiche. Puoi farlo tramite RSS con un lettore di feed.

Changelog (registro delle modifiche)

1.3

  • Bug fix provided by Albin.

1.2

  • Plugin transferred to Marios Alexandrou. Support and development resumed.
  • Confirmed compatibility with WordPress 4.4.2.

1.1.5

  • Added support for custom pagination_base.

1.1.0

  • Fixed compatibility for WordPress 3.4.

1.0.0

  • Initial release.