I am working on a site in which if a new private directory(CPT) is created, a mail notification should be sent to the author. I have installed a "Better Notifications for WordPress" plugin but it is not working when any private directory(CPT) is been created. So for that, I want to write a function so that it will check if a new private directory is created, it will be executed. How to check that?

  • The term "private directory" confuses me especially because you use it in combination with custom post type. Which can't be dynamically created, only programmatically. To guess and summarize your question, do you mean you want to trigger an admin email notification when a directory somewhere private (e.g. above public_html) is created? – Fleuv Jan 29 '18 at 7:35
  • According to the Better Notifications for WordPress page it should be able to notify you when a new custom post type post is created, so I suggest you ask the developer there: wordpress.org/support/plugin/bnfw – Peter HvD Jan 29 '18 at 12:09
  • Yes, I have added a ticket to the support team as it should notify when any custom post type is created. – Aditya Batra Jan 29 '18 at 18:24
  • @Fleuv Private because when an advertiser creates listing then until and unless that listing is not reviewed it will not be seen on the frontend. So till then it will be private and only author will able to see it, – Aditya Batra Jan 29 '18 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.