Permalinks Customizer

Descripción

Customize your URL and set the slug. You can use basic keywords which is defined by the WordPress for defining the permalinks as well as some new keywords which is defined by this plugin. All the keywords are defined on the Tags page under Permalinks Customizer.

By using Permalinks Customizer you can set the different permalink structure for each PostType and Taxonomy.

How to set the Permalinks for the PostTypes separately

Let’s assume that you have 6 PostTypes and they all have different style of permalinks. Like:

  1. Blog : For this post type you want to create a permalink which looks like this: http://www.example.com/blog/year-month-date-postname/
  2. Customers : For this post type you want to create a permalink which looks like this: http://www.example.com/customers/postname/
  3. Events : For this post type you want to create a permalink which looks like this: http://www.example.com/events/year-month-date-postname/
  4. Press : For this post type you want to create a permalink which looks like this: http://www.example.com/press/category/year/postname/
  5. News : For this post type you want to create a permalink which looks like this: http://www.example.com/news/year/postname/
  6. Sponsors : For this post type you want to create a permalink which looks like this: http://www.example.com/company/sponsor/post_title/

This plugin allows you to do this very easily. You just need to go on Permalinks Customizer Settings Page. Where text fields are shown with PostType name. You can define your permalinks you want to create for each post type.

If you leave any PostType field empty. So, Permalinks Customizer would create a permalink for that PostType by using the default permalink settings.

How to Configure Permalinks Customizer

You can configure the plugin by going to the menu Permalinks Customizer that appears in your admin menu.

OR

http://www.example.com/wp-admin/admin.php?page=permalinks-customizer-posts-settings

Structure Tags

Tags for PostTypes

  • %title% : Title of the post. let’s say the title is “This Is A Great Post!” so, it becomes this-is-a-great-post in the URI.
  • %year% : The year of the post, four digits, for example 2004
  • %monthnum% : Month of the year, for example 05
  • %day% : Day of the month, for example 28
  • %hour% : Hour of the day, for example 15
  • %minute% : Minute of the hour, for example 43
  • %second% : Second of the minute, for example 33
  • %post_id% : The unique ID # of the post, for example 423
  • %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.
  • %parent_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. This Tag contains Immediate Parent Page Slug if any parent page is selected before publishing.
  • %all_parents_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. This Tag contains all the Parent Page Slugs if any parent page is selected before publishing.
  • %category% : A sanitized version of the category name (category slug field on New/Edit Category panel). Nested sub-categories appear as nested directories in the URI.
  • %child-category% : A sanitized version of the category name (category slug field on New/Edit Category panel).
  • %product_cat% : A sanitized version of the product category name (category slug field on New/Edit Category panel). Nested sub-categories appear as nested directories in the URI. This tag is specially used for WooCommerce Products.
  • <%ctax_custom_taxonomy%> : A sanitized version of the custom taxonomy where the taxonomy name is custom_taxonomy. Replace the custom_taxonomy with your appropriate created taxonomy name.
    If you want to provide the default slug which is used when the category/taxonomy doesn\’t be selected so, make sure to provide default name/slug which looks like this: <%ctax_custom_taxonomy??sales%>. Value which is written between the ?? and %> is used as default slug.
  • %author% : A sanitized version of the author name.
  • %author_firstname% : A sanitized version of the author first name. If author first name is not available so, it uses the author\’s username.
  • %author_lastname% : A sanitized version of the author last name. If author last name is not available so, it uses the author\’s username.

Note: %postname% is similar as of the %title% tag but the difference is that %postname% can only be set once whereas %title% can be changed. let’s say the title is “This Is A Great Post!” so, it becomes “this-is-a-great-post” in the URI(At the first time, %postname% and %title% works same) but if you edit and change title let’s say “This Is A WordPress Post!” so, %postname% in the URI remains same “this-is-a-great-post” whereas %title% in the URI becomes “this-is-a-wordpress-post”

Tags for Taxonomies

  • %name% : Name of the Term/Category. let’s say the name is “External API” so, it becomes external-api in the URI.
  • %term_id% : The unique ID # of the Term/Category, for example 423
  • %slug% : A sanitized version of the name of the Term/Category. So “External API” becomes external-api in the URI.
  • %parent_slug% : A sanitized version of the name of the Term/Category. So “External API” becomes external-api in the URI. This Tag contains Immediate Parent Term/Category Slug if any parent Term/Category is selected before adding it.
  • %all_parents_slug% : A sanitized version of the name of the Term/Category. So “External API” becomes external-api in the URI. This Tag contains all the Parent Term/Category Slug if any parent Term/Category is selected before adding it.

Be warned: This plugin is not a replacement for WordPress’s built-in permalink system. Check your WordPress administration’s “Permalinks” settings page first, to make sure that this doesn’t already meet your needs.

Filter

Exclude Permalinks

If you want to exclude some Permalink to processed with the plugin so, just add the filter looks like this:

function yasglobal_exclude_url( $permalink ) {
  if ( false !== strpos( $permalink, '/contact-us/' ) ) {
    return '__true';
  }
  return;
}
add_filter( 'permalinks_customizer_exclude_request', 'yasglobal_exclude_url' );

Show Relative Permalink/URL

To show relative permalink/url in Edit Post, add this filter in your themes functions.php.

add_filter( 'permalinks_customizer_remove_home_url', '__return_true' );

Exclude PostType from the Plugin

To exclude the plugin to be worked on any PostType. Add this filter in your themes functions.php.

function yasglobal_exclude_post_types( $post_type ) {
  if ( $post_type == 'page' ) {
    return '__true';
  }
  return '__false';
}
add_filter( 'permalinks_customizer_exclude_post_type', 'yasglobal_exclude_post_types');

Note: Plugin stops working on the backend. No more permalinks would be generated by the plugin but the permalink which are already created will remains in work.

Disable automatically create redirects

To disable automatically create redirects feature on creating and updating the post/pages/categories, add this filter in your themes functions.php.

add_filter( 'permalinks_customizer_auto_created_redirects', '__return_false');

This filter stops to be creating new redirects but existed redirects keeps working. To stop existed redirects, add permalinks_customizer_disable_redirects filter.

Disable Redirects

To disable redirects to be applied , add this filter in your themes functions.php.

add_filter( 'permalinks_customizer_disable_redirects', '__return_false');

This filter only stop redirects to be work but the automatically create redirects still works. To stop automatically create redirects feature add permalinks_customizer_auto_created_redirects filter.

Thanks for the Support

The support from the users that love Permalinks Customizer is huge. You can support Permalinks Customizer future development and help to make it even better by leaving a 5 star rating with a nice message to me 🙂

Bug reports

Bug reports for Permalinks Customizer are welcomed on GitHub. Please note GitHub is not a support forum, and issues that aren’t properly qualified as bugs will be closed.

Capturas

  • Permalinks can be set for each and every PostType from PostTypes Settings Page. The empty permalink field for the PostType will use the WordPress Permalink Settings.

  • All the available tags which can be used for defining the permalinks for PostTypes are listed here. Some of the tags are defined here may only be used with this plugin only.

  • Permalinks can easily be changed for the single post from its post edit page.

  • Permalinks can be set for each and every Taxonomies from Taxonomies Settings Page. The empty permalink field for the taxonomy would not create the permalink for it.

  • All the available tags which can be used for defining the permalinks for Taxonomies are listed here. These tags may work with this Plugin Only.

  • Permalinks can easily be changed for the single Term from its Term edit page.

Instalación

This process defines you the steps to follow either you are installing through WordPress or Manually from FTP.

From within WordPress

  1. Visit ‘Plugins > Add New’
  2. Search for Permalinks Customizer
  3. Activate Permalinks Customizer from your Plugins page.
  4. Go to “after activation” below.

Manually

  1. Upload the permalinks-customizer folder to the /wp-content/plugins/ directory
  2. Activate Permalinks Customizer through the ‘Plugins’ menu in WordPress
  3. Go to “after activation” below.

After activation

  1. Go to the plugin settings page and set up the plugin for your site.
  2. You’re done!

Preguntas frecuentes

Installation Instructions

This process defines you the steps to follow either you are installing through WordPress or Manually from FTP.

From within WordPress

  1. Visit ‘Plugins > Add New’
  2. Search for Permalinks Customizer
  3. Activate Permalinks Customizer from your Plugins page.
  4. Go to “after activation” below.

Manually

  1. Upload the permalinks-customizer folder to the /wp-content/plugins/ directory
  2. Activate Permalinks Customizer through the ‘Plugins’ menu in WordPress
  3. Go to “after activation” below.

After activation

  1. Go to the plugin settings page and set up the plugin for your site.
  2. You’re done!
Q. How to define Settings for the PostType?

A. Go to WordPress Dashboard under Permalinks Customizer, Go to PostTypes Settings Page, there is a textfield for all the available PostType. On this field, you can define structure which is used for this PostType.

Q. Can i use tags in PostType Settings?

A. Yes, you can use any tag as defined on the Permalinks Customizer page under the TAGS FOR POSTTYPES heading.

Q. Does the plugin supports custom taxonomy tag?

A. Yes, it supports custom taxonomy tag. You can define the tag as mentioned on the Permalinks Customizer page.

Q. Can i see the created permalinks for the PostType?

A. Yes, you can see all the created permalinks on the PostType Permalinks Page under Permalinks Customizer.

Q. How to define Settings for the Taxonomies?

A. Go to WordPress Dashboard under Permalinks Customizer, Go to Taxonomies Settings Page, there is a textfield for every available Taxonomies. On this field, you can define structure which is used for this Taxonomy.

Q. Can i use tags in Taxonomies Settings?

A. Yes, you can use any tag as defined on the Permalinks Customizer page under the TAGS FOR TAXONOMIES heading.

Q. Can i see the created permalinks for the Taxonomies?

A. Yes, you can see all the created permalinks on the Taxonomies Permalinks Page under Permalinks Customizer.

Q. Can i regenerate all the permalinks according to the defined structure?

A. Yes, you can regenerate all the permalinks according to the defined structure. To have a bulk permalink update, Go to the All Post page there is a a option in the bulk action drop down with the name of Regenerate Permalinks. Use that option for regenerating the Permalinks.

Q. Does *Regenerate Permalinks* damage my site SEO?

A. No, it won’t damage your site SEO. As regenerating permalinks added redirect against their previous permalink.

Q. Can i see the available redirects?

A. Yes, you can see the all the redirects created by this plugin from the Redirects Page under the Permalinks Customizer in the WordPress Dashboard.

Q. Can i disable/delete redirects?

A. Yes, you can disable/delete the redirects from the Redirects Page using Bulk Action.

Q. Can i exclude PostType from the Plugin?

A. Yes, you can exclude any posttype from the plugin to be worked on. For this just add the filter as shown in the Filters Section with the name of Exclude PostType from the Plugin.

Reseñas

Could Not Delete Plugin Through Dashboard

I found another permalink plugin that I decided to use instead of this one. When I tried to delete this one I got an error and it wouldn’t delete. I had to manually delete it using cpanel which sketches me out. I don’t even remember why I switched but now I’m glad I did.

El plugin de permalinks más completo

Lo tiene todo, estructuras de urls personalizadas tanto para items single como plantillas de archivos, tanto de post como de custom post types. Me he pasado un rato buscando una solución para los permalinks sencilla y eficaz, y ésta es la mejor.

OJO: HAY QUE REGENERAR LOS ENLACES DE LAS ESTRUCTURAS. Tiene una opción bulk que lo hace, pero se debe hacer por lote manualmente, sino, no te va a funcionar para los enlaces ya existentes.

Una pasada! Lo próximo a traducirlo al castellano 😀

Very Good Plugin

Very useful plugin which offers many options and works well.
The plugin author is reactive and provides effective support.
Thanks!

Not that great with CPT

Works well with customp taxonomies.
Still, it’s not working weel with Custom Post Types.
You have to manually type ALL THE PERMALINKS’ posts …

So, the plugin works well BUT it is not practical.

Leer todas las 24 reseñas

Colaboradores y desarrolladores

“Permalinks Customizer” es un software de código abierto. Las siguientes personas han colaborado con este plugin.

Colaboradores

“Permalinks Customizer” ha sido traducido a 3 idiomas. Gracias a los traductores por sus contribuciones.

Traduce “Permalinks Customizer” a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN , o suscríbete al log de desarrollo por RSS .

Registro de cambios

2.3.0 – Sept 10, 2018

  • Enhancement
    • Added Support for Gutenberg
    • Added Privacy Policy Content on Admin Panel

2.2.0 – Aug 10, 2018

  • Enhancement

    • Added Media (Attachment) Support
    • Added Regenerate Permalink in Bulk Action for Media (Attachment)
    • Added Filter to Exclude the PostType from the Plugin to be worked on
    • Added Support of WP All Import Plugin
    • Removing Permalink Edit Form from Private PostTypes and Taxonomies
  • Bug

    • Plugin causing 504 gateway error when submitting a post for review
    • Prevent Permalink to be created for the private PostTypes like Coupon, Order etc

2.1.0 – July 16, 2018

  • Enhancement

    • Generate Post Permalink as soon as Post saved at the very first time
    • Prevent to add auto-redirects for plain permalinks
    • Regenerate Permalink on Quick Edit Post
    • Added filter by which relative permalink can be shown on post edit page
  • Bug

    • Regenerate Status Issue on Post/Page
    • Fixed Permalinks Customizer Version issue on plugin update
    • Removed Convert URL Page

2.0.1 – July 16, 2018

  • Bugs
    • Fixed subdomain URL issue
    • Make the URLs to absolute on Admin Pages so, Permalinks for subdomain points to the correct URL

2.0.0 – July 09, 2018

  • Enhancements
    • Added Custom Taxonomy Support for PostTypes
      • Define the Custom Taxonomy tag in PostType permalink structure
      • Define default taxonomy which is used in the permalink when no taxonomy is selected
    • Added Regenerate Permalinks in Bulk for PostTypes
    • Added Regenerate Permalinks in Bulk for Taxonomies
    • Added Redirect Functionality
      • Automatically create redirects on changing the permalink
      • Automatically create redirects on creating post/taxonomy
      • Automatically disable redirects if the newly created permalink was redireted before
      • Enable / Disable redirects from Plugin redirects Page
      • Delete redirects from Plugin redirects Page
      • Added Filters to disable redirects functionality if needed
    • Added Capabilities which allow users to view permalinks and manage settings without having administrator role
    • Reduce Query over non-admin pages
    • Avoid appending slashes and use trailingslashit instead
    • Removed unused PostTypes and Taxonomies (Only Public PostTypes and Taxonomies are shown on Settings Page)
  • Bugs
    • Added a check for create term, to reduce undesired notifications.
    • Fixed undefined variable warning in PostType Permalinks and Taxonomies Permalinks Page
    • Fixed PHP warning on Bulk update over PostType Permalinks and Taxonomies Permalinks Page when no post/category is selected
    • Print $view_post varaible value

Earlier versions

  • For the changelog of earlier versions, please refer to the separate changelog.txt file.