I am looking for some code where member can’t use the same title as another post already having or used.
e.g if there is a post with title “Amazing Australia Tour” than it should not allow to use the same title to same or other user.
I am looking for some code where member can’t use the same title as another post already having or used.
e.g if there is a post with title “Amazing Australia Tour” than it should not allow to use the same title to same or other user.
You must be logged in to post a comment.
Main Code
Please check the auxiliary code after this block
Auxiliary Code
The method used to check if a new post/page is being created or not requires a
post_meta
that has to be applied to all previous posts/pages.This answer was assembled using:
post-new.php
is TheDeadMedic’s answer to this other one: Why does save_post action fire when creating a new post?I’ve been able to prevent same post Titles with Ajax. Here’s what I did:
on functions.php
on my admin_script.js