• Resolved Icethrill

    (@icethrill)


    Hello! So I got this problem. The website I am working on want to add an Event section. So I just thought making them take the advantage of using posts. But then I thought about that WordPress can show the latest posts from a category but not the latest event coming up. The latest event coming up could have been one of the older posts added.

    Now I have never used custom fields before. And I find it kinda hard to grasp what it is. But would it be possible to write an custom field for a date when the event is gonna happen and then the client write the date themselves in the custom fields. Ofcourse I am gonna need to instruct them how to but thats a problem for later.

    I wanted to ask of you guys who are more experienced with custom fields if this could be possible? Or is the idea bad? And I would greatly appreciate it if you had any links to any references I could use!

    Any help appreciated! ?? Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • But would it be possible to write an custom field for a date when the event is gonna happen and then the client write the date themselves in the custom fields

    I think it’s a really good use for custom fields. and it will work for events providing you enter/store dates in the format `yyyy-mm-dd’ so that you compare them directly. I’ve written custom templates for event listings that use this approach and they seem to work just fine.

    Example: https://wordpress.pastebin.ca/1541537

    Thread Starter Icethrill

    (@icethrill)

    think it’s a really good use for custom fields. and it will work for events providing you enter/store dates in the format `yyyy-mm-dd’ so that you compare them directly. I’ve written custom templates for event listings that use this approach and they seem to work just fine.

    Example: https://wordpress.pastebin.ca/1541537

    Wow thanks for the quick answer! Will take a look at it right away!

    Thread Starter Icethrill

    (@icethrill)

    Must say your solution saved me lots and lots of time! Thanks yet again!

    Example: https://wordpress.pastebin.ca/1541537

    Above link is not found. Is this now posted somewhere else? Looks interesting!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Is this a good usage of custom fields?’ is closed to new replies.