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

wordpress thumbnail url

<img src='<?php the_post_thumbnail_url(); ?>'>
Comment

Wordpress thumbnail

// without parameter -> Post Thumbnail (as set by theme using set_post_thumbnail_size())
get_the_post_thumbnail( $post_id );                   
 
get_the_post_thumbnail( $post_id, 'thumbnail' );      // Thumbnail (Note: different to Post Thumbnail)
get_the_post_thumbnail( $post_id, 'medium' );         // Medium resolution
get_the_post_thumbnail( $post_id, 'large' );          // Large resolution
get_the_post_thumbnail( $post_id, 'full' );           // Original resolution
 
get_the_post_thumbnail( $post_id, array( 100, 100) ); // Other resolutions
Comment

PREVIOUS NEXT
Code Example
Php :: create model controller migration factory laravel in one command 
Php :: preg_replace remove double quotes 
Php :: php exit foreach 
Php :: laravel validation unique email 
Php :: composer require laravel/ui not working laravel 7 
Php :: php get start and end date of month and year 
Php :: php get filename without extension 
Php :: laravel check if get is empty 
Php :: php date today plus 1 month 
Php :: convert string to decimal php 
Php :: php reload current page 
Php :: php datetime add one hour 
Php :: Date time format for laravel validation 
Php :: PHP strncmp — Binary safe string comparison of the first n characters 
Php :: foreach comma separated string php 
Php :: get last two numbers from int php 
Php :: how to add properties to the request object in laravel 
Php :: Laravel 7 create-project 
Php :: Date and Time PHP Continued 
Php :: get last slash value in php 
Php :: deprcation problem phpmyadmin ubuntu 
Php :: twig print_r 
Php :: ci3 upload file 
Php :: link js file in php 
Php :: phoenix input type password 
Php :: combine array except common ones php 
Php :: get message validator failed laravel 
Php :: how get just one parameter of all objects in one array in laravel 
Php :: function that checks number only in php 
Php :: forward parameter from blade to another blade with filter 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =