I need a simple wordpress function which i can put on my existing site plugin. The function need to check the page id and if matches to required ID, it shall change a particular keyword in title between <h1></h1> to new title in single page.
1. Page ID to match, say 12. If page ID 12 matches, the do step 2.
2. If keywords between <h1></h1> is exact match and have any of the set of keyword "keyword1,keyword2,keyword3,keyword4", rewrite title to "Some Words KEYWORD1 Some Words".
Note: As for step 2, the following is what i meant for rewrite:
<h1>Keyword1</h1> - to be rewritten
<h1>The sentence has Keyword1 in between or anywhere in senteance</h1> - not to be rewritten