-
Notifications
You must be signed in to change notification settings - Fork 42
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_enqueue_style example brings E_NOTICE #1575
Comments
Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels. |
Heads up @kafleg @carolinan @TeBenachi - the "themes" label was applied to this issue. |
So how can readers be encouraged to continue reading and not only copy part of the code example? |
I copied the whole example.
- but even it does not tell you that all the previous examples were incomplete. |
The relevant documentation for including assets is here and includes more in-depth examples: https://developer.wordpress.org/themes/core-concepts/including-assets/ I'm not sure how we might want to address the current page since it will be deprecated/removed or integrated into the Classic Themes chapter as part of #816. The information isn't wrong. It just assume some preexisting knowledge about the correct hooks to use (this isn't the case with the newer doc). Maybe, for now (at least until the Classic Themes chapter is overhauled), we should put an alert banner at the top of the page to redirect readers to the new doc?? |
@justintadlock that is a good solution. Are you able to update the article? |
Updated and added an alert box to go to the newer doc: https://developer.wordpress.org/themes/basics/including-css-javascript/ |
Thank you. |
Issue Description
I followed the "adding your stylesheet" instructions at https://developer.wordpress.org/themes/basics/including-css-javascript/#stylesheets and got an E_NOTICE from my wordpress 6.5 instance:
Message I got from wordpress:
URL of the Page with the Issue
https://developer.wordpress.org/themes/basics/including-css-javascript/#stylesheets
Section of Page with the issue
Enqueuing Scripts and Styles > Stylesheets
Why is this a problem?
The documentation should tell me what I have to do to make it right, not provide code that gives errors.
Suggested Fix
Already tell about the
wp_enqueue_scripts
function.The text was updated successfully, but these errors were encountered: