You mean using
<img src="img/sample/family.jpg" alt="smiling girl" class="thumb"/>
instead of
<img src="/wp-content/themes/<?php echo bloginfo('get_template') . '/img/sample/family.jpg'; ?>" alt="smiling girl" class="thumb"/>
It still doesnt show the picture. But when i designed the website without wordpress implementation it worked ok.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Yes, sorry I meant that but I got the URL wrong. Try this instead;
<img src="img/logo.png" alt="smiling girl" class="thumb"/>
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Is that due to CSS applying to the “thumb” class?
Hmm no, even without the thumb class it is the same size.. Smaller than before.
and the thumb class is for that family picture.
.post-item img.thumb {
float:left;
padding-right:20px;
padding-left:20px;
padding-top:20px;
}
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Have you concluded the image is now loading?
What do you mean by that?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Do you still get this error;
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Sorry, I cannot hypothesize anymore.
Hmmm, when i use
<img src="<?php echo bloginfo('get_template') . '/img/sample/family.jpg'; ?>" alt="smiling girl" class="thumb"/>
its the URL
<img src="ZPMpravna/img/sample/family.jpg" alt="smiling girl" class="thumb"/>
but the index.php file is located in ZPMpravna so isnt that the URL should be “/img/sample/family.jpg” without the ZPMpravna?
Ok now it works!
with this:
<img src="<?php echo bloginfo('template_directory') . '/img/sample/family.jpg'; ?>" alt="smiling girl" class="thumb"/>
its template_directory instead of get_template š
anyway thanks for your time Andrew! š
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
And thanks for sharing the answer to the community š