issue using wp_count_posts to style based on post quantity
-
Hi everyone,
I am convinced I am doing something really dumb here but unfortunately I cannot figure out for the life of me where I am going wrong.
I am currently creating my own theme for my website and created a custom post type for projects to use like a portfolio. ( I haven’t done any of the styling until I have finished the functionality so it is looking a little rough.) What I am trying to achieve is for the project page, if there is one post then display the post, if there is more than one post then display in a different manner and if there aren’t posts then display the 404.
What appears to be happening is it is echoing the correct number of project posts but instead of outputting all three it is outputting the first post in both the =1 and the >=2 but not displaying any of the other posts. I am a bit stumped and any help would be greatly appreciated.Thanks in advance
- The topic ‘issue using wp_count_posts to style based on post quantity’ is closed to new replies.