I want meta description of currently executing page in the header.php file in wordpress.
Wordpress function "get_post_meta" is not useful for this. It only returns custom meta tags.
can anyone help me out.
I want meta description of currently executing page in the header.php file in wordpress.
Wordpress function "get_post_meta" is not useful for this. It only returns custom meta tags.
can anyone help me out.
I'm going out on a limb and assuming that you're generating meta description tags dynamically. If that's the case, this should get you what you need...
<?php
echo get_post_meta($post->ID, 'description', true);
?>
If, on the other hand, that's not what you're doing... that method will not work.