PHP conditional for page-image DIV in page.php
-
I could use some PHP help (I’m quite rusty with PHP) –
I have the following static pages/slugs:
history, vineyards, wine, contactAnd I would like to place a graphic within <div id=”page-image”></div> depending upon the page being displayed. (And I’m custom styling #page-image in “style.css”.)
So I assume I need to add a conditional statement to WordPress “page.php” so that as long as there is no attachment being used, the <div id=”page-image”></div> tags will have the appropriate graphic placed inside the tags.
The graphic names basically match the page names. For now, the URLs to the images are:
http://localhost:8888/wp-content/uploads/2013/07/history_img.jpg
http://localhost:8888/wp-content/uploads/2013/07/vineyards_img.jpg
http://localhost:8888/wp-content/uploads/2013/07/wine_img.jpg
http://localhost:8888/wp-content/uploads/2013/07/contact_img.jpgSo, how do I set this up properly?
The topic ‘PHP conditional for page-image DIV in page.php’ is closed to new replies.