Saltar navegación

[Cerrado] wpApiSettings getting removed from post type

This support ticket is created 2 years, 10 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.

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Nigel 2 years, 10 months ago.

Autor
Mensajes
#2639511
Screen Shot 2023-08-30 at 3.51.22 PM.png

I am trying to: make AJAX call to a custom post type.

Link to a page where the issue can be seen: enlace oculto

I expected to see: Chrome devtools ... wpApiSettings variable should be set

Instead, I got: wpApiSettings undefined

#2639663

Nigel
Colaborador

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+01:00)

Hi there

Have you done anything to make a JavaScript object wpApiSettings available on the front end?

It's not something that is available by default on a WordPress site as far as I know, but you can use wp_localize_script to make data available on the front end in such an object, perhaps that is what you are referring to?

This doesn't seem to be related to Toolset, sorry.

El debate ‘[Cerrado] wpApiSettings getting removed from post type’ está cerrado y no admite más respuestas.