Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 11-19-2019, 04:07 AM   #1
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
Old 11-19-2019, 04:22 AM   #2
Paul&John
Confirmed User
 
Paul&John's Avatar
 
Industry Role:
Join Date: Aug 2005
Location: YUROP
Posts: 8,597
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(); ?>
<?php the_post_thumbnail_url(); ?>
Check the WP reference for usage (image size etc):
https://developer.wordpress.org/refe...thumbnail_url/
https://developer.wordpress.org/refe...thumbnail_url/
__________________
Use coupon 'pauljohn' for a $1 discount at already super cheap NameSilo!
Anal Webcams | Kinky Trans Cams Live | Hotwife XXX Tube | Get your Proxies here
Paul&John is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-19-2019, 04:37 AM   #3
hausarzt
Confirmed User
 
hausarzt's Avatar
 
Industry Role:
Join Date: Jan 2011
Location: Somewhere in Germany
Posts: 817
Quote:
Originally Posted by Paul&John View Post
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(); ?>
<?php the_post_thumbnail_url(); ?>
Check the WP reference for usage (image size etc):
https://developer.wordpress.org/refe...thumbnail_url/
https://developer.wordpress.org/refe...thumbnail_url/
Yepp, already tried both. No success.
__________________
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
Old 11-19-2019, 08:56 AM   #4
awxm
Confirmed User
 
Industry Role:
Join Date: Aug 2009
Posts: 819
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.
__________________
.
awxm is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-19-2019, 10:42 AM   #5
Kittens
👏 REVOLUTIONARY 👏
 
Kittens's Avatar
 
Industry Role:
Join Date: Jan 2016
Posts: 1,440
Quote:
Originally Posted by hausarzt View Post
Wordpress: One line of php. Can anyone help?
Delete wordpress.
__________________
Kittens is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-19-2019, 07:58 PM   #6
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,230
<meta itemprop="thumbnailUrl" content="<?php echo get_the_post_thumbnail_url(); ?>" />

<meta itemprop="thumbnailUrl" content="<?php the_post_thumbnail_url(); ?>" />



__________________
Make Money with Porn
blackmonsters is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-20-2019, 08:00 AM   #7
hausarzt
Confirmed User
 
hausarzt's Avatar
 
Industry Role:
Join Date: Jan 2011
Location: Somewhere in Germany
Posts: 817
Quote:
Originally Posted by awxm View Post
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.
That did the trick
__________________
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
Old 11-20-2019, 12:32 PM   #8
j3rkules
VIP
 
j3rkules's Avatar
 
Industry Role:
Join Date: Jul 2013
Posts: 22,112
Quote:
Originally Posted by hausarzt View Post
That did the trick
j3rkules is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
theme, guys, wordpress, line, php, google, sucks, videos, code, meant, thumbnailurl, missing, video-tag, couple, bought, recently, hey, answer, support, forum, reputation
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.