I am working on a foreach loop in WordPress and want to add ‘post_class()’ to a div within it. Currently the code looks like this: if ( is_array( $posts...
I have added this code to my child theme’s functions.php file and use the new class but it styles the entire site, not the page I added to the...
I’ve only just realised that custom post types don’t appear to output the category as a class in the loop, via post_class and I wonder if anyone can suggest...
In the following code I would like to remove the div that wrap all the code and pass its class to article, but I do not know how to...
If anyone can help that’d be great. I’ve found a snippet of code that I’ve used which is pretty much doing what I want it to do, which lists...
I would like to add a class to my gallery short code, this is how I have added my class: . Now the confusion comes in, I am not...
I’m working on a WordPress site for my band and I’d like to mark every 3rd post on our blog page to have a special class applied to it,...