How to get template name or category before publish
Question
I use wp_insert_post
hook.
I was trying to use get_page_template_slug
, get_the_category
, get_post_meta($post_id, '_wp_page_template', true)
No success at all for a template. And category return undefined
.
Thanks.
0
10 months
2022-03-21T15:02:08-05:00
2022-03-21T15:02:08-05:00 0 Answers
0 views
0
Leave an answer