-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wp_register_script doesn't work in wp_enqueue_scripts #7084
Comments
How are you registering your custom taxonomy? You have to make sure that it's registered before using it. I'm assuming it's the default priority (10) but called after |
Yes, that's correct. A plugin has While I can use 11 priority to fix this, shouldn't it be possible to use I don't know if this is a bug but it was unexpected by me that |
@manake Were you able to track a resolution for this down? If not, can you share a fully-functional (not sample) code snippet that reproduces the issue? |
You already have the full code. You only don't have a
Again: I don't know if this is a bug. If I can't use The documentation uses https://wordpress.org/gutenberg/handbook/blocks/writing-your-first-block-type/ |
Isn't the correct way to use |
@manake since it has been a few months since this issue was started, may I ask if you're still having trouble and if the code examples are still good? If yes, I will see what I can do to help test and will get additional help with that if I need it. Thanks so much! |
Closing as stale, let's reopen if there's are reproducible steps/actionable items. |
This doesn't work:
This doesn't work:
Reason:
var gutenbergXxx = {"categories":{"errors":{"invalid_taxonomy":["Invalid taxonomy."]},"error_data":[]}};
Is the only option to make it work to use
add_action( 'init', 'slug_gutenberg_blocks', 11 );
?Expected: Being able to enqueue scripts in regular
wp_enqueue_scripts
to have access to custom post types etc.The text was updated successfully, but these errors were encountered: