Dynamically add a class to a particular post
-
I’m trying to figure out how to add a unique class to the fourth and last page on my blog page.
I have four posts. The first is displayed full width and in its entirety. The next three are displayed in divs as excerpts, side by side below the first post. The idea is that each is one-third of the width of the full post above.
In order to get the proportions of these three right, I need to add a class to the last of the three to remove right padding.
I’d appreciate any suggestions. The layout of the divs is shown roughly below in code if my explanation isn’t clear.
<div>Post 1: Full width</div> <div id="recent"> <div>Post 2</div><div>Post 3</div><div>Post 4</div> </div><!-- #recent -->
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Dynamically add a class to a particular post’ is closed to new replies.