How To Get Featured Image Url ()


Now I want lớn get the full featured image on clichồng on the anchor tag for which I need a featured image URL in

How can I fix this?

Bạn đang xem: How To Get Featured Image Url ()



Chechồng the code below và let me know if it works for you.

ID ) ): ?> ID ), "single-post-thumbnail" ); ?>



If you want JUST the source, và not an array with other information:

ID), "thumbnail" ); ?>

You will try this

ID), "full"); ?> // Here you can manage your image size like medium, thumbnail, or custom kích thước


eđến pathinfo($image->guid, PATHINFO_DIRNAME);

Xem thêm: Công Ty Quảng Cáo Google Adwords Giá Rẻ Uy Tín, Học Quảng Cáo Google Adwords Giá Rẻ


ID), "thumbnail_size"); $feature_image_url = $image_src<0>; ?>You can change the thumbnail_form size value as per your required form size.

You can also get the URL for image attachments as follows:

".wp_get_attachment_url(304, array(50,50), 1)."
Simply inside the loop write as shown below:-

$args=array("post_type" => "your_custom_post_type_slug","order" => "DESC","posts_per_page"=> -1) ;$the_qyery= new WP_Query($args);if ($the_qyery->have_posts()) : while ( $the_qyery->have_posts() ) : $the_qyery->the_post();?>
Highly active sầu question. Earn 10 reputation in order to answer this question. The reputation requirement helps protect this question from spam và non-answer activity.

Not the answer you're looking for? Browse other questions tagged php wordpress post or ask your own question.

site thiết kế / biệu tượng công ty © 2021 Staông xã Exchange Inc; web1_user contributions licensed under cc by-sa. rev2021.5.14.39304

Your privacy

By clicking “Accept all cookies”, you agree Staông chồng Exchange can store cookies on your device & discthất bại information in accordance with our Cookie Policy.