WordPress / Learn

WordPress.org Learn - The canonical source for the code and content behind https://learn.WordPress.org
260 stars 89 forks source link

Including assets #2089

Closed cynthianorman closed 1 month ago

cynthianorman commented 9 months ago

Details

Learning Objectives

The learning objectives are to:

Relevant Links

https://developer.wordpress.org/themes/core-concepts/including-assets/

github-actions[bot] commented 3 months ago

Lesson Development Checklist

cynthianorman commented 2 months ago

This Intermediate Theme Developer Learning Pathway Lesson is ready to be reviewed. Please follow the steps listed under Guidelines for reviewing content. Thank you for your contribution! ✨

https://youtu.be/mxEe9HquA4s

ironnysh commented 2 months ago

Tutorial/Lessons Review Checklist

Great lesson, @cynthianorman.

Watching this, I thought it might be nice to add an explanation on how to include fonts. What do you think?

cynthianorman commented 2 months ago

@ironnysh I was originally going to then opted out when I learned of the font library BUT of course there are many themes out there including fonts via functions.php so I'll add it in

Thank you!

ironnysh commented 2 months ago

The Font Library is a real finallly for non-coders :-) But yeah, including fonts in the theme is very common. Check this out, as well: https://make.wordpress.org/core/2024/03/14/new-feature-font-library/.

digitalchild commented 2 months ago

Tutorial/Lessons Review Checklist

Please tick all items you've confirmed:

A nice overview for including assets @cynthianorman

2:20 - You mention that they are located within the assets, JS folder. It might be a good visual to collapse the assets folder on the left to show where it is located, so there is no confusion.

cynthianorman commented 2 months ago

Thank you for your feedback @digitalchild.

jonathanbossenger commented 1 month ago

https://youtu.be/5Q9vRmDgKJ4

cynthianorman commented 1 month ago

@jonathanbossenger

YouTube chapters

(0:07) Learning objectives (0:30) Describe how to enqueue styles and scripts (1:09) Include CSS in your theme either using stylesheets or inline styles (1:59) Include JavaScript in your theme by either using an external file or inline JavaScript (2:33) Include images in your theme (3:01) Include fonts in your theme. (4:14) Next steps

cynthianorman commented 1 month ago

//publish