• Hello!

    So my client is a major magazine, published monthly, in my city. They have a section dedicated to puzzles, and every month they post the answers on their website. There is currently a bank of answers going all the way back to 2004.

    The design I was given shows the main portion of content as dynamically produced blocks displaying the answers to each specific puzzle. On the right hand side is a section of the current year’s months, and underneath it a selection option to change years. THESE ARE NOT ARCHIVES (I keep asking people and they keep sending me to how to display archives as monthly).

    Each month is a “post” and when one is clicked, the content boxes in the main section should update with the corresponding answers.

    Therefore on the backend, I would like to create a “Puzzles” section within the admin menu of the dashboard. When clicked on, you will be given a selection of years to choose from, with the top option being the most current year (this should update at the beginning of every year).

    When the year is selected, the user should then be sent to a new screen displaying the months of the year, where they can then click through the month to fill answers out. When a month is selected, then a third and final screen is displayed with a form to fill out the answers that will be displayed on the frontend.

    I am not a beginner, but I have not come across a necessity to do this before. If someone can point me in the right direction on how to create WordPress UI Menus in the backend, that would be greatly appreciated.

    • This topic was modified 2 years, 7 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    When you create a post type, WP will generate the usual back end UI just like it does for posts and pages — a list table of all current posts of the type and an Add New button and admin menu item. Add New takes you to the standard post edit screen.

    You’re best off leveraging this UI to suit your needs via custom meta boxes on the edit screen. For example, a meta box can handle the year/month selection process without needing to go through multiple screens. The selected month/date can be saved as post meta data, or it can be made into the post’s date/time stamp.

    It is possible to suppress this default behavior and develop you own screen sequence, but TBH I don’t see the point. You can develop your own screens that are added to the admin menu with add_menu_page() and add_submenu_page(). To add custom metaboxes to the standard edit screen, see the Plugin Handbook. There are also a several custom fields plugins that make adding fields to the various admin edit screens much easier.

Viewing 1 replies (of 1 total)
  • The topic ‘Creating a Backend User Interface for a custom post type’ is closed to new replies.