1 2 3 4 5 6 7 8 |
function titleRestrictionFilter($title){ global $post; $title = $post->post_title; $restrictedWord = "forbidden"; if (stristr( $title, $restrictedWord)) wp_die( __('Error: This title is containing restricted word') ); } add_action('publish_post', 'titleRestrictionFilter'); |
I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.
Subscribe
Login
0 Comments