Hi Everyone, I’m trying to edit some fairly straight forward php code and I have very minimal experience. I thought I’d get lucky simply cutting and pasting the arguments I wanted but alas, no dice. Hopefully someone here can assist.
Essentially all I’m trying to do is take the existing code that contains a php reference:
[php] [/php]
…and add an “if, then” type of element to it. Something like:
[php] //if listing has no photo, use default photo in images/nophoto.gif in images folder
else
$imgUrl = get_bloginfo(“template_url”) . “/ygl-assets/images/nophoto.gif”;
?>[/php]
The idea is that if there is no image to display (on the site in question), then it will use the default image. As it is, every time there isn’t an image it starts screwing up other elements of the page (another leg of my education to be sure but one thing at a time).
Every attempt at mixing the two together renders the page blank on load (probably because I’m doing it very wrong).
Can anyone help?
Thank you!