I’m creating my own project page, and each project will have a primary hero image. I’m naming them all with “-hero” at the end of them (projectA-hero.jpg, projectB-hero.jpg, etc), but not sure how I’m supposed to be writing the PHP to load that.
This is the full code of my project page template:
However this seems broken because nothing else loads after the h2. Help would be appreciated.
EDIT: OK I was using a $project variable which wasn’t on here so I reverted it to $page and it “unbroke” the page but the image still isn’t appearing. I just get the alt text and the src appears empty.
The code looks alright to me. Are you sure the image is in the correct folder? Have you turned on debugging in your config.php? Or do you get any error messages in your server’s php log files?