Remove metatag from a particular page

That would be: <php if (!is_page(‘slug-of-your-page’)) echo ‘<meta name=”viewport” content=”width=device-width, initial-scale=1″ />’ ?> Beware that if you change the theme files, your changes will be lost if the theme gets updated.

Applying metatag to single page

You can use the WordPress conditional tags to accomplish this. Both is_page() and is_singular() should work, you just need to pass a slug, or in your case, an ID. Then we can use the wp_head hook to conditional add in the meta tag. You can add the following function and hook into your functions.php file. … Read more

Replace -tag in the_excerpt

You should try this: function replace_tag($string){ $search = array(‘<p>’, ‘</p>’); $replace = array(‘<h2>’, ‘</h2>’); echo str_replace($search, $replace, $string); return $string; } add_filter(‘the_excerpt’, ‘replace_tag’); or this: function replace_tag($string){ $replace = array( ‘<p>’ => ‘<h2>’, ‘</p>’ => ‘</h2>’ ); $string = str_replace(array_keys($replace), $replace, $string); return $string; } add_filter(‘the_excerpt’, ‘replace_tag’);

My single.php page skips the first div tag

While it is not officially answered the question, it is a suggested debugging technique for future audience to see how to resolve the related problem: If you ever meet such situation. Then most likely there is some tag(s) is(are) missing creating such cascading effect. So could try to hide the content output first to see … Read more