Adding An If/Else Statement
When I open a particular page I want wordpress to check the page ID and if it is a certain page ID then insert “image1”. If page ID equals another predefined ID then insert “image2” etc.
In other words;
If page ID equals 15, insert image1.jpg
If page ID equals 16, insert image2.jpg
If page ID equals 17, insert image3.jpg
Generally I need the code to be able to achieve this as I really am not all that good at PHP.
I look forward to your help and thank you.
- The topic ‘Adding An If/Else Statement’ is closed to new replies.