Displaying Category Posts using IF statement

Home Forums Calendar Products Events Calendar PRO Displaying Category Posts using IF statement

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #62601
    quantafire
    Participant

    Hey!
    So I’ve been trying to get this to work but I can’t seem to find the right function in your documentation.
    I need to run a function that checks to see if there are posts in a category and if there are, it then displays just the dates of the event with a description (as in, we can have description on the left, and then we just have a list of the dates. If there aren’t, then it does not display the dates OR the description at all (as if it never even existed). I could not find the code that would check to see if the category has posts in the first place so I got a little lost.
    Does anyone have a solution for this? Or any suggested code?
    Many thanks!

    #63081
    Barry
    Member

    Hi quantafire,

    I’m not absolutely clear as to the context, but if for instance categories are being viewed in list form then within (a custom copy of) list/content.php you should simply be able to use WordPress’s have_posts() function.

    Does that help here?

    #980370
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Displaying Category Posts using IF statement’ is closed to new replies.