Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retrieve meta description
#1
Is there a template tag/function that returns only the meta description? I see there's a
Code:
get_page_meta_keywords()
, and
Code:
get_header()
, but I'd like to retrieve only the meta description.
Reply
#2
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) { 
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
Shawn,
That's exactly what I was looking for. Thanks!
Reply




Users browsing this thread: 1 Guest(s)