Skip Navigation

[Resuelto] How to create a movie database?

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:
Do you have any suggestions how to create a movie database?

Solution:
We suggest one Post Type (Movies) and classify the rest with either Fields or Taxonomies.

There are several approaches, some of which we also document:
https://toolset.com/documentation/customizing-sites-using-php/displaying-repeating-fields-one-kind/
https://toolset.com/2015/07/how-to-group-posts-by-category/
https://toolset.com/2015/06/8-ways-to-improve-the-user-experience-of-your-wordpress-admin/ > Tip 3: Organize your data details using custom fields
https://toolset.com/2015/04/how-to-create-a-news-site-using-wordpress-if-you-are-not-a-php-developer/

The Year can be a taxonomy or Field, both allow you to query by them in the front end of a post view.
Also, you can sort primarily by both.

This support ticket is created hace 7 años, 2 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Este tema contiene 4 respuestas, tiene 2 mensajes.

Última actualización por Daniel hace 7 años, 1 mes.

Asistido por: Beda.

Autor
Mensajes
#572841

Hello

I need help on how to organize the data in WordPress to make a database of movies as follows:

The main CPT will be Movies.
Each movie will be assigned the following data: Year - Director - Country - Genre

With this information I want to show listings of movies by Country - By Director - By Genre - By Year

Whenever I show the list of movies I want them to be grouped by year.

For example, the structure of a movie listings by country would look like this:

COUNTRY: USA
2017
List of 2017 USA movies
2016
List of 2016 USA movies
2015 ....

At the same time I want to be able to filter that listing by genre (or/and director) through some filters in the sidebar, so I can show something like this:

COUNTRY: USA +FILTER Genre: Comedy
2017
List of 2017 USA COMEDY movies
2016
List of 2016 USA COMEDY movies
2015 ....

If I select a particular year to see only the movies of that year the list will change:

YEAR: 2017
List of 2017 movies

But if I want to filter more, I still want to be able to do:

YEAR: 2017 +FILTER Genre: Comedy +FILTER Director: Steven
List of 2017 COMEDY movies By STEVEN

I will add more fields like COMPANY - LANGUAGE... to each movie to be able to filter the listings as in the previous examples.

My main question is how do I organize all this within WordPress?
Apart from the CTP Movies the rest of the information like: YEAR - COUNTRY - DIRECTOR - COMPANY - GENDER - LANGUAGE should they all be CTPs?
The data of the YEAR is very important because all the listings are grouped by year.

For now what I would need is guidance on how to start organizing this structure within WordPress.

Thanks!
Daniel

#572848

I would go with one Post Type (Movies) and classify the rest with either Fields or Taxonomies.

There are several approaches, some of which we also document:
https://toolset.com/documentation/customizing-sites-using-php/displaying-repeating-fields-one-kind/
https://toolset.com/2015/07/how-to-group-posts-by-category/
https://toolset.com/2015/06/8-ways-to-improve-the-user-experience-of-your-wordpress-admin/ > Tip 3: Organize your data details using custom fields
https://toolset.com/2015/04/how-to-create-a-news-site-using-wordpress-if-you-are-not-a-php-developer/

The Year can be a taxonomy or Field, both allow you to query by them in the front end of a post view.
Also, you can sort primarily by both.

#572867
database-03.jpg
database-02.jpg
database-01.jpg

Thanks Beda!

I'm attaching some pictures to visualize what I need.

In the pictures, the list shows the DIRECTOR category and then filters are applied. But the same thing should be done by showing the category COUNTRY + filters, GENRE + filters... etc.

In the case of using taxonomies, I think I will face the problem of how to sort the results when more than 1 taxonomy is involved.

Can I get the results as in the pictures using only the MOVIES CTP and taxonomies for the rest of fields?

#573553

The Date is a Field.
The Movie a Custom Post Type.
The rest are taxonomies.

You can then:
- create an archive for movies and add Custom Searches by Taxonomies and Fields.
- You can order the results as primary order by your Custom Date Field as well.
- create the same kind of posts (movies) list on a Posts View, which you can place anywhere on your website.

You can add Custom Filters by each thing (taxonomy, field) once per View or Archive.

This should cover all you need, as far I understand it.

#574011

Thank you Beda!

I think this is a good starting point for the design of the project.