0
votes
1answer
863 views

Add class to DIV depending on page loaded

I'm designing a new theme and in my page template a have a section where an image is displayed . I would like this image to change depending on which page is loaded. The section is a DIV like this: ...
1
vote
2answers
3k views

How to conditionally enqueue a stylesheet only for a certain page(s)?

Before I get started, I want to acknowledge that there are some really good articles that are targeted at how to conditionally enqueue scripts based on page/post content. WordPress Plugin ...
0
votes
1answer
360 views

Using PHP Increment and Conditional Statement to Alternate Loop Background

I'm trying to alternate the background on a theme page that is displaying a custom loop: $args = array( 'post-type' => 'portfolio', 'posts_per_page' => 10 ); $loop = new ...