wjl11
Member
Posted 12 months ago #
Is there a way to display what is contained in the meta 'description' tag of my page?
I thought since there is an option to display the page title:
<h1><?php the_title(); ?></h1> ...
that you could do the same for the page description.
Thanks,
Will
I'd recommend a meta tags or SEO plugin.
wjl11
Member
Posted 12 months ago #
I have an SEO plugin which enables you to change the meta page description. I want to DISPLAY it within the text of the page.
For example:
The meta description of this page is: <?php the_description(); ?>
It depends how the meta description is generated. If it is in a custom field, then you could display the custom field.
http://codex.wordpress.org/Using_Custom_Fields
wjl11
Member
Posted 12 months ago #
It is not a custom field.
It's a standard meta 'description' created by the All-in-One-SEO-Pack plugin.
I'm trying to use the meta 'description' within an H2 tag.
It is not a custom field.
It's a standard meta 'description' created by the All-in-One-SEO-Pack plugin.
You could try looking in the plugin code to find a function/variable that you could use.
wjl11
Member
Posted 12 months ago #
I found the answer on Darren Pangan's page:
<?php echo get_post_meta($post->ID, 'description', true) ?>