How to add a meta tag to one page only
-
Hi,
I want to add something into the head section of just one specific page in my blog (a page, not a post), a meta tag like this —
<meta http-equiv='Refresh' content='0;url=javascript:history.go(-1)'>
I’ve tried the following in my header —
<?php if (is_single()) { if ($custom_header = get_post_meta($post->ID, 'custom_header', true)) { echo $custom_header; } } ?>
— and created a custom field for that page called
custom_header
with the meta as the value, but that hasn’t worked. How can I add that meta tag to just one specific page?Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to add a meta tag to one page only’ is closed to new replies.