It is currently December 3rd, 2022, 6:54 am



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Wordpress related
PostPosted: December 10th, 2021, 11:20 am 

Joined: November 28th, 2021, 6:23 pm
Posts: 9
Hello,
maybe I will find some good soul here and will help me with my wordpress problem :)

What I want to achieve is to have something like this showing up on my post page, under the uploaded image:

Code:
[URL=https://link to post page.com/Ytj][IMG]https://link to thumbnail.jpg[/IMG][/URL]


Is there someone able to help me please?


Top
 Profile  
Reply with quote  
Fikper.com - Cloud Storage - PPS / PPD
 Post subject: Re: Wordpress related
PostPosted: December 10th, 2021, 6:43 pm 

Joined: November 28th, 2021, 6:23 pm
Posts: 9
I figured out the first part of code with:

Code:
<?php echo get_permalink($post->ID);?>


But I have no idea how to call thumb url


Top
 Profile  
Reply with quote  
 Post subject: Re: Wordpress related
PostPosted: December 10th, 2021, 7:19 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12010
Location: Earth
Some Googling, try these:

Code:
<?php
    $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID), 'full' );

    echo $url;
?>


or

Code:
<?php
   $url = get_the_post_thumbnail_url( null, 'full' );

   echo $url;
 ?>


You can use url later as needed (in img tags).

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Theme designed by stylerbb.net © 2008
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All times are UTC