When building your own theme in WordPress, using Jquery with $ might cause issues. To fix this wrap your code in this:
Sometimes you might want to programatically include other things in your menu in WordPress and to do that you will want to control the UL tags so you can insert other LI items within it.
The code below will allow you to spit out ONLY the LI tags from a WordPress Nav Menu, you will have to wrap it in UL yourself so you can add extra LI.
In my WordPress site, I had a need to list all taxonomies and underneath them, their related custom post types.
To do this, I used this code below. Obviously replace “custom_taxomy” with your taxonomy name and “custom_post_type” with your post type name.
Sometimes it can look good to gradually fade in a page on website load. It gives a page a nicer feel.
Adding JS to WordPress can be done in two ways. The first way is to enqueue the JS file.
The second way can be done by adding inline JS via a hook in functions.php – this is most likely used to initialize a script that is enqueued or add Google Tracking codes, Facebook pixels etc.
Implement FontAwesome Pro in CSS using Pseudo elements, it comes in handy when creating drop down menus, etc.
Change the font weight based on the library you are using.
Eg if you are using Font Awesome Light, use weight of 300.