WordPress.org

Ready to get started?Download WordPress

Forums

CMS Press
publish_post with custom post types (4 posts)

  1. khadlock
    Member
    Posted 3 years ago #

    I've created a custom post type using cms press and I need to run some custom code in the "publish_post" hook for this post type, but it doesn't seem to ever get called. Anyone have any idea why?

    Strange thing is that "save_post" works, but that's not quite what I'm looking for.

    http://wordpress.org/extend/plugins/cms-press/

  2. prettyboymp
    Member
    Plugin Author

    Posted 3 years ago #

    The 'publish_post' action is post type specific. So if you have a custom post type, you need to change the hook you use. IE, if your post type is 'foobar', the hook you should use is 'publish_foobar'.

  3. khadlock
    Member
    Posted 3 years ago #

    Perfect, that makes sense, thanks!

  4. seyed110011
    Member
    Posted 3 years ago #

    Thanks for developing this plugin - it has been awesome, but Im having trouble with SEO ... Google and native search -both are not picking up the new posts... can you please help !

    Could a hook change help?

    THANKS SO MUCH ...

    Details: here

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags