• Resolved drewhowell21

    (@drewhowell21)


    I’m developing a theme and have ran into a weird problem. I’m using archive.php to display posts for categories.

    The problem I’m having is that it’s displaying the posts backwards from the way I want.

    I have 2 different types of posts (“spotlite” & regualar listings). If the post has the tag ‘Spotlite’, it should be styled different and displayed at the top. As of now, the regular listings are at the top and the ‘Spotlite’ posts are below.

    I believe there’s something wrong with the nested if statements I have. I’m a novice to PHP and WP Development. I have pasted the code on Pastebin and will provide a link below.

    Does anyone see where the problem is or can anyone suggest a more efficient method to achieve what I want?

    Link to Code: https://pastebin.com/6Y4fJdzQ

Viewing 1 replies (of 1 total)
  • Thread Starter drewhowell21

    (@drewhowell21)

    Well I found a way to fix my problem. I ended up just running 2 loops on the page, which actually allows me to do some of the other things I wanted.

Viewing 1 replies (of 1 total)
  • The topic ‘Trouble Displaying Certain Posts At The Top Of The Page’ is closed to new replies.