Search
 
SCRIPT & CODE EXAMPLE
 

PHP

wordpress get post thumbnail url

<?php 
  // ALL parameters are optional. Not needed if you are on WP LOOP
  echo get_the_post_thumbnail_url( $the_query->ID, array( 500, 400) ); ?>
Comment

get post thumbnail url

<?php if (has_post_thumbnail( $post->ID ) ): ?>
  <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
  <div id="custom-bg" style="background-image: url('<?php echo $image[0]; ?>')">

  </div>
<?php endif; ?>
Comment

PREVIOUS NEXT
Code Example
Php :: php header base64 pdf 
Php :: share link in twitter php 
Php :: header cross origin using php only for our domains and subdomain 
Php :: how create new command in laravel 
Php :: php switch 2 variables 
Php :: object of class symfonycomponentformformview could not be converted to string 
Php :: Mask credit card number in PHP 
Php :: how to send html tags in twig template 
Php :: laravel gigapay create employee 
Php :: php change an associative array into indexed array 
Php :: php directory listing 
Php :: php post curl json 
Php :: php check if its a name 
Php :: PHP Fatal error: Constructor test::test() cannot declare a return type in /home/iBMCb9/prog.php on line 6 
Php :: laravel migrate only one table 
Php :: the requested php extension ext-intl * is missing from your system ubuntu 
Php :: laravel human readable date 
Php :: get current page php 
Php :: php Error!: could not find driver 
Php :: laravel_8 
Php :: laravel create migration view 
Php :: laravel join query sum example 
Php :: file upload in php through ajax 
Php :: debian install apache php 
Php :: php sessions 
Php :: php artisan services 
Php :: object to string php 
Php :: laravel module remove 
Php :: php get random value from array 
Php :: if any error in blade laravel 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =