Auto append text after the title?

Original Title -> Original Title – Lorem ipsum

How can I do this with hard code?

I want this to stop those cunts that web scrape my web without giving credit and making money off my posts from their ads

I found something like this

function titlerestriction($title){
global $post;
$title = $post->post_title;
$restrictedWords = “word1;word2;word3”;
$restrictedWords = explode(“;”, $restrictedWords);
foreach($restrictedWords as $restrictedWord){
if (stristr( $title, $restrictedWord))
wp_die( __(‘Error: You have used a forbidden word in post title’) );
}
}
add_action(‘publish_post’, ‘titlerestriction’);

but its the opposite of what i need

Read more here:: Auto append text after the title?

Leave a Reply

Your email address will not be published. Required fields are marked *