I'm having trouble determining the width and height of my post thumbnail I
here's the image There is a link for
As you can see that both posts have different dimensions
I have tried to fix the height and width of my post. Sometime in Actually what I want to achieve is that if I can not upload an image on the image image, then it will come out with a height of 250 pixels and a width of 250 pixels. But whatever I do is wrong.
This is the code I have encoded
index.php
& lt? Php if (has_post_thumbnail) ()) {The_post_thumbnail (); }? & Gt; function.php
// post thumbnail support3
add_theme_support ('post thumbnail', array ('post') ); Set_post_thumbnail_size (250, 250); Am I missing something? I'm still trying to code in wordpress and php language Actually I am still a newbie. I really want to complete this without having to do this on the plug
after "text" itemprop = "text" > Here is the code:
& lt ;? Php the_post_thumbnail (array (215152), array ('class' = & gt; 'thumbnail')); ? & Gt; array (215152) You can change your value for your price which is the height and width
or
you can use used images
& lt ;? php if (has_post_thumbnail ()) {$ large_image_url = wp_get_attachment_image_src (get_post_thumbnail_id (), 'large'); echo '& lt; img src = ''. $ Large_image_url [0] '' title = "'the_title_attribute (' echo = 0 ')' 'width =" 250px "height =" 250px "> gt;' ...} & gt;
No comments:
Post a Comment