![]() |
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; ?>" /> Code:
<meta itemprop="thumbnailUrl" content="" /> I tried several codes, to get at least something. Example: Code:
<meta itemprop="thumbnailUrl" content="<?php echo $get_the_post_thumbnail_url; ?>" /> Code:
<meta itemprop="thumbnailUrl" content="<?php echo $title; ?>" /> Solution? |
I'm going offline now but get_the_post_thumbnail_url and the_post_thumbnail_url are functions so you call them like this
Code:
<?php get_the_post_thumbnail_url(); ?> https://developer.wordpress.org/refe...thumbnail_url/ https://developer.wordpress.org/refe...thumbnail_url/ |
Quote:
|
I had a similar problem recently. Does the theme use custom fields for images rather than native wordpress featured images perhaps?
*edit* If you are talking about a WP-Script theme, copy the featured image url to "Main thumbnail" block and update post. |
Quote:
|
<meta itemprop="thumbnailUrl" content="<?php echo get_the_post_thumbnail_url(); ?>" />
<meta itemprop="thumbnailUrl" content="<?php the_post_thumbnail_url(); ?>" /> :2 cents: |
Quote:
|
Quote:
|
All times are GMT -7. The time now is 12:10 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc