0

I need to add a bus timings category for a client.

I need to have

FROM STOP (selectable field) TO STOP (selectable field) START HOUR (selectable field but optional) END HOUR (selectable field but optional)

take these inputs and show results with running buses in table within those times.

similar to this one

stackoverflow.com/questions/40524279/need-mysql-query-for-search-bus-from-stop-and-to-stop

Which do i use CPT or meta fields ?

Kindly help me get started.

1

I recommend the following Wordpress plugin:

https://wordpress.org/plugins/advanced-custom-fields/

This allows you to put custom fields in each post or CPT like the following:

  • Text
  • Textarea
  • Range
  • CheckBox
  • Radio button
  • Select
  • Date Picker
  • Date Time Picker
  • Wysiwyg Editor
  • etc...

For the fields FROM STOP,TO STOP,START HOUR and END HOUR you can use: Select and Date Time Picker

1
  1. Create custom post type: https://codex.wordpress.org/Post_Types#Custom_Post_Types https://generatewp.com/post-type/

  2. Download ACF and add fields.

  3. Create loop: https://codex.wordpress.org/The_Loop

Let me know if you have any questions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.