Sauter la navigation

[Résolu] Prevent duplicate post titles from being created

This support ticket is created Il y a 5 années et 3 mois. 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
- 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)

Ce sujet contient 17 réponses, a 2 voix.

Dernière mise à jour par duongN-3 Il y a 5 années et 3 mois.

Assisté par: Waqar.

Auteur
Publications
#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!