I am using register_post_type to create post_meta so in “add new” functionality after adding and publish it is redirecting to “edit page”. How I can redirect it to list page after publish?
Leave a Reply
You must be logged in to post a comment.
I am using register_post_type to create post_meta so in “add new” functionality after adding and publish it is redirecting to “edit page”. How I can redirect it to list page after publish?
You must be logged in to post a comment.
You can use
redirect_post_location
action hook to redirect your post type to location or url you need after editing or publishing.It checks for your post type and create the url to the list page of your post type and set new redirect locations.
Hope this helps you 🙂