mirror of
https://github.com/ascribe/wp-theme
synced 2024-12-31 17:17:47 +01:00
fix meta description for product pages
This commit is contained in:
parent
1d9b246338
commit
4534502960
@ -12,7 +12,7 @@ $description = '';
|
|||||||
$image = '';
|
$image = '';
|
||||||
$title = '';
|
$title = '';
|
||||||
$url = get_bloginfo('wpurl');
|
$url = get_bloginfo('wpurl');
|
||||||
$permalink = esc_url( get_permalink($post->ID) );
|
$permalink = esc_url( get_permalink() );
|
||||||
$twitter = '@ascribeio';
|
$twitter = '@ascribeio';
|
||||||
|
|
||||||
if ( has_post_thumbnail() ) {
|
if ( has_post_thumbnail() ) {
|
||||||
@ -46,7 +46,15 @@ $title .= get_bloginfo();
|
|||||||
//</editor-fold>
|
//</editor-fold>
|
||||||
|
|
||||||
//<editor-fold desc="Get Description">
|
//<editor-fold desc="Get Description">
|
||||||
|
|
||||||
|
// Heads Up! This doesn't work cause it's outside of loop.
|
||||||
|
// But the following functions should handle all other use cases.
|
||||||
$description = get_the_excerpt();
|
$description = get_the_excerpt();
|
||||||
|
|
||||||
|
if ( get_field('header_tagline') != '' ) {
|
||||||
|
$description = strip_tags(get_field('header_tagline'));
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($description)) {
|
if (empty($description)) {
|
||||||
|
|
||||||
$content = get_field('subtemplate')[0]['content'];
|
$content = get_field('subtemplate')[0]['content'];
|
||||||
|
Loading…
Reference in New Issue
Block a user