Skip Navigation

[Resuelto] Prevent duplicate post titles from being created

This support ticket is created hace 5 años, 1 mes. 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Este tema contiene 17 respuestas, tiene 2 mensajes.

Última actualización por duongN-3 hace 5 años, 1 mes.

Asistido por: Waqar.

Autor
Mensajes
#1371211

Thank you for the updated code! I think it's working as expected now.

One more thing: I'd like to add this to multiple post types. Can I update the post type in the code like below?

$args = array( "post_type" => array('drama', 'movie', 'special', 'person', 'fansubber'), "name" => $title, "post_status" => array('publish', 'pending') );

Thank you again!

#1371227

You're very welcome and glad that the code is working as expected now.

And yes your updated line should work to fetch the titles from multiple post types, for the comparison.

regards,
Waqar

#1371669

My issue is resolved now. Thank you!