Static content before posts in the loop, but after a sticky one when it exists
-
Hi,
I have a custom home page where usually there is a sticky post followed by regular posts, and between them, a static content to indicate where regular posts start. It’s something like this:
STICKY POST <h3>Regular posts</h3> Regular posts
To achieve this structure, I used a conditional
is_sticky()
in the loop and wrote the<h3>Regular…
inside it.It works like a charm when there is a sticky post, but it’s not always the case.
Is there a way to have a h3 title/any content before regular posts in the loop, but below the sticky post when it exists?
Thanks!
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Static content before posts in the loop, but after a sticky one when it exists’ is closed to new replies.