Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get META description to show?
#1
I'm using a custom theme I made years ago. Seems GS no longer supports this 
PHP Code:
<?php get_page_meta_keywords(); ?>
 in the meta description. My pages have no meta description, despite having filled in a meta description from within Admin (page options).

I'm running version 3.3.10 but will upgrade to 3.3.13 shortly.
Reply
#2
That template tag is for meta keywords. For the meta description you should use:
Code:
<?php get_page_meta_desc(); ?>
Reply
#3
Thumbs Up 
(2017-12-01, 22:01:12)Carlos Wrote: That template tag is for meta keywords. For the meta description you should use:
Code:
<?php get_page_meta_desc(); ?>

Thank you Carlos! That's working for me.
Reply
#4
(2017-12-01, 12:27:27)j*z Wrote: I'm using a custom theme I made years ago. Seems GS no longer supports this 
PHP Code:
<?php get_page_meta_keywords(); ?>
 in the meta description. My pages have no meta description, despite having filled in a meta description from within Admin (page options).

I'm running version 3.3.10 but will upgrade to 3.3.13 shortly.

If you need the meta description of ANY page (not only the current) you can use
PHP Code:
<?php getPageField('ANY_PAGE_SLUG','metad'); ?>


Alex
Reply
#5
Thumbs Down 
(2017-12-06, 20:00:35)Alexander_ Wrote:
(2017-12-01, 12:27:27)j*z Wrote: I'm using a custom theme I made years ago. Seems GS no longer supports this 
PHP Code:
<?php get_page_meta_keywords(); ?>
 in the meta description. My pages have no meta description, despite having filled in a meta description from within Admin (page options).

I'm running version 3.3.10 but will upgrade to 3.3.13 shortly.

If you need the meta description of ANY page (not only the current) you can use
PHP Code:
<?php getPageField('ANY_PAGE_SLUG','metad'); ?>


Alex
Reply




Users browsing this thread: 1 Guest(s)