WordPress.org

Plugin Directory

Custom Post & Taxonomy Hierarchy SEO with Woocommerce Support

這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Custom Post & Taxonomy Hierarchy SEO with Woocommerce Support

外掛說明

If your site has Custom Post Types and Custom Taxonomies, this plugin will allow you to select which Custom Post Types to include the Custom Taxonomies in the URL structure for.

We are now offering Woocomerce support as well. Your products URL structure can include the list of nested categories.

For example:

If you have a custom post type called “Projects” and a taxonomy for “Project Types”.

This plugin will give you:
http://domain.com/projects/project-type/project-slug/

Instead of the default:
http://domain.com/projects/project-slug/

If your Woocommerce product “Woo Ninja” was categorised under: cloting >> hoodies

This plugin will give you:
http://domain.com/shop/clothing/hoodies/woo-ninja/

Instead of the default:
http://domain.com/shop/woo-ninja/

螢幕擷圖

  • In your wp-admin dashboard, look for these settings. There you choose the custom post types you want to have the slug include the taxonomies for.

  • Example of what you can expect your URL structure to be.

安裝方式

Either install the plugin the traditional way through your Admin dashboard’s Plugins screen, or you can :

  1. Upload the plugin files to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. In WP-admin, look for Custom Post Tax Hierarchy in your left-hand sidebar menu. There you must select which Custom Post Types for this to apply to.

Go to your custom post type posts, either in your Admin dashboard, or the front-end of your website, and look at the URL, it now includes all your custom taxonomy terms.

常見問題集

Installation Instructions

Either install the plugin the traditional way through your Admin dashboard’s Plugins screen, or you can :

  1. Upload the plugin files to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. In WP-admin, look for Custom Post Tax Hierarchy in your left-hand sidebar menu. There you must select which Custom Post Types for this to apply to.

Go to your custom post type posts, either in your Admin dashboard, or the front-end of your website, and look at the URL, it now includes all your custom taxonomy terms.

What if I don’t have any custom post types or taxonomies yet?

If you want a GUI interface through which to create your custom post types and taxonomies, I would recommend you use this plugin : https://wordpress.org/plugins/pods/.
Alternatively, if you are familiar with PHP, you could just follow the follow the Codex examples : https://codex.wordpress.org/Post_Types

What if I enable this plugin and all my posts are broken?

All this plugin does is create rewrite rules that maps your URL back to an actual post. If you find that after you’ve enabled this plugin, things go horribly wrong, simply disable the plugin and create a support request here.

Will this work for Woocommerce?

Yes it definitely will! We have added Woocommerce support to our FREE plugin.

Why do my URL’s now suddenly have a numerical suffix e.g /name-of-post-1234/

That’s a really good question. The answer is a bit technical. Becuase you could technically have a post and a category with exactly the same URL, we’ve had to add a way of differentiating between the two. For example you could have domain.com/amazing-pictures/ which could be a category, but domain.com/amazing-pictures/ could also be a single post. In WordPress they’re treated the same, but we need to know which is which. Therefore, your post will be suffixed by the unique post identifier. This is the industry standard way of doing it and is completely SEO safe.

使用者評論

2017 年 4 月 25 日
Tested on an nginx setup with the Divi theme, works out of the box on Divi’s ‘Project’ custom post type.
閱讀全部 1 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Custom Post & Taxonomy Hierarchy SEO with Woocommerce Support〉的開發相關工作。

參與者

變更記錄

1.0.3

  • I forgot to flush permalinks after editing a taxonomy term.

1.0.2

  • Fixing bug reported by @rbertrand. The plain taxonomy archive pages didn’t work. I added the rewrite rules for them.

1.0.1

  • First bug fixes to make admin custom post type selection take effect.

1.0

  • Initial release, have fun 🙂