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 yasglobal_xml_sitemap_url( $permalink ) {
  if ( false !== strpos( $permalink, 'sitemap.xml' )) {
    return '__true';
  }
  return;
}
add_filter( 'custom_permalinks_request_ignore', 'yasglobal_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 remove the like query to being work just add this line in your theme’s functions.php:

add_filter( 'cp_remove_like_query', '__return_false');