My understanding of PHP is pretty basic so please forgive me if I don't use the correct terms, please ask for clarification if I do.
My ultimate goal is to create a slider that loads different sets of images depending on the URL, but some of the pages share the same images as others so I'd like to be able to share some images across multiple pages, using PHP to pull in the photos would save a lot of time editing each page seperatly.
I know I can use <?php if (is_page_template('homepage.php')) { ?>
in Wordpress to specify an action on a particular page as long as it has a template. But needing lots of template files gets messy and leaves me with my original problem.
So is there something along the lines of <?php if (is_url('example.com/stuff')) { ?>
that I could use instead?
And if so, is it possible to make it an array of url's? eg have more than one URL listed per command? I'm not quite sure on the syntax that would be required to do that.
I'll make an example to help you see where I'm going, but the syntax is probably way off.
EXAMPLE:
<div id="products">
<div class="slides_container">
<ul>
<li>
<?php if (is_url('example.com/stuff') || ('example.com/other-stuff')) { ?>
<img src="images/picture.jpg" alt="Pretty Picture" />
<?php } ?>
</li>
</ul>
</div>
</div>
Help is greatly appreciated.