PHP code example of samiahmedsiddiqui / custom-permalinks
1. Go to this page and download the library: Download samiahmedsiddiqui/custom-permalinks library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
samiahmedsiddiqui / custom-permalinks example snippets
function yasglobal_exclude_post_types( $post_type ) {
// Replace 'custompost' with your post type name
if ( 'custompost' === $post_type ) {
return '__true';
}
return '__false';
}
add_filter( 'custom_permalinks_exclude_post_type', 'yasglobal_exclude_post_types' );