URL Customization

To customize your URL layouts, go through the following codes.

Filters For Free Version

If you want to exclude this plugin’s implementation for a few urls, then use the following filter code:


function check_xml_sitemap_url( $permalink ) {
  if ( false !== strpos( $permalink, 'sitemap.xml' )) {
    return '__true';
  }
  return;
}
add_filter( 'custom_permalinks_request_ignore', 'check_xml_sitemap_url' );

If you want to exclude this plugin’s implementation from any post types, then use custom_permalinks_exclude_post_type filter below:


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

Note: custom_permalinks_exclude_post_type doesn’t work on page links which have been created already.

To make the like query works as it was before so, just add this line in your theme’s functions.php:

add_filter( 'custom_permalinks_like_query', '__return_true');

Note: Use custom_permalinks_like_query filter if the URLs doesn't works for you after upgrading to v1.2.9