Posts: 5
Threads: 2
Joined: Oct 2013
Is there a template tag/function that returns only the meta description? I see there's a
Code:
get_page_meta_keywords()
, and
, but I'd like to retrieve only the meta description.
Posts: 6,267
Threads: 182
Joined: Sep 2011
Look at theme_functions.php
PHP Code:
/**
* Get Page Meta Description
*
* @since 2.0
* @uses $metad
* @uses strip_decode
*
* @param bool $echo Optional, default is true. False will 'return' value
* @return string Echos or returns based on param $echo
*/
function get_page_meta_desc($echo=true) {
Posts: 5
Threads: 2
Joined: Oct 2013
Shawn,
That's exactly what I was looking for. Thanks!