0

I need to enable font sizes options in editor with add_theme_support, but only for the specific post types and page templates.

To distinct them, I need to get the post ID in the WP admin, before add_theme_support gets executed.

The problem is that hook I am using is after_setup_theme, and seems like page ID is not initialized at the time this hook fires.

Is there some other hook I can use for add_theme_support ? Or is there a way to somehow get the post ID during after_setup_theme ?

P.s. $_REQUEST['post'] wont work because I need the ID when creating a new post as well.

1 Answer 1

0

you can use the admin_enqueue_scripts hook to add support for the font sizes options to specific post types and page templates in the WordPress admin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.