I am creating a custom theme, and still pretty new at this. I'd like to get it set so that a photo appears on the side of the main content. I would like that photo to be pulled from a set of photos, and the pulled photo would correspond to the page slug url.
Essentially, in the page.php file, I would have
<img src=" <template URL>/images/<page-slug-name>.jpg">
How do I call the template URL and page-slug-name? Also, in case there isn't a photo for that slug name, could I have a default photo that would be inserted? How would that be done?
thanks!