IcedEarth213
-
Posts
1 -
Joined
-
Last visited
Never
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
WordPress PHP Q: getting a img filename and doing if/else
in Applications
Posted
What I'm trying to do: For my WP site I'm building I have some custom image headings, so instead of <h1> tags, it would be an image.
I was trying to build a wordpress function where it would look and see if the page's title has a corresponding image (PNG), and if so, display it. If not, display the regular <h1> tag.
It would probably be best to do page slug instead of title though...not sure..here's what I have:
It's currently broken, it always returns the 'else' value, even though I have an image named appropriately. Ideas?