Saltar navegación

[Resuelto] Load data CPT from functions[dot]php

This support ticket is created 3 years, 4 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Zona horaria del colaborador: Asia/Kolkata (GMT+05:30)

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Minesh 3 years, 4 months ago.

Asistido por: Minesh.

Autor
Mensajes
#2540651

Hi,
I have a CPT named "test."
In my CPT "test" I have a "macro category" and "micro category" field. How can I, from functions.php create a query that will export me all the posts of a given macro category and/or micro category?

Also from functions.php is it possible to export all the items in a drop-down menu (example macro category)? Not of the individual post item but of the menu in general.

Regards

#2541011

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

There is no such feature a available with Toolset so that you can export the posts from functions.php file.

Here is how you can query posts based on specific taxonomy with WP_Query:
=> https://developer.wordpress.org/reference/classes/wp_query/#taxonomy-parameters

You will have to write your own custom code that should fulfill your requirement or you should find number of plugins available that should help you to export your desired content.

Here are few plugins that might help you:
- https://wordpress.org/plugins/wp-ultimate-exporter

Please check method 2 with the following article:
- enlace oculto

Following articles may help you as well:
- enlace oculto

If you require any help with such custom code - you are welcome to contact any of our certified partners:
- https://toolset.com/contractors/