View Single Post
Old 11-19-2019, 04:07 AM  
hausarzt
Confirmed User
 
hausarzt's Avatar
 
Industry Role:
Join Date: Jan 2011
Location: Somewhere in Germany
Posts: 817
Wordpress: One line of php. Can anyone help?

Hey guys.
I recently bought a Wordpress theme from a couple of guys who do not have such a good reputation here in the forum.
The support, unfortunately, does not answer, so I'm here to ask if anyone can help with a line php.

Google says the video-tag for "thumbnailUrl" is missing. This sucks, because the theme is meant for videos.

This is the code on the theme:
Code:
<meta itemprop="thumbnailUrl" content="<?php echo $thumb; ?>" />
This is the output on my site:
Code:
<meta itemprop="thumbnailUrl" content="" />
Yepp, I have added a featured image/thumbnail to each post, but somehow there is no output. So i guess, there is a small glitch in the php code.
I tried several codes, to get at least something.
Example:
Code:
<meta itemprop="thumbnailUrl" content="<?php echo $get_the_post_thumbnail_url; ?>" />

<meta itemprop="thumbnailUrl" content="<?php echo the_post_thumbnail_url; ?>" />
I even tried this, just for a test, if anything comes up:
Code:
<meta itemprop="thumbnailUrl" content="<?php echo $title; ?>" />
And, voila, I get the title of the post. So basically the meta itemprop="thumbnailUrl" content=" is correct, only the php-part is not.

Solution?
__________________
I know, my english is bad. But your german might be even worse
hausarzt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote