This is a really neat, lightweight and simple was to add a fade in onto your page when it loads.
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.
I was working on a project using VueJS and was using this datepicker which is a great vue plugin.
However, when sending the date to the database in Laravel, it posts as ISO8601 format (eg. 1996-10-15T00:05:32.000Z)
MySQL doesn’t like that format, so we need to convert it to the correct date time format so MYSQL can store it.
To do it, we use Carbon. Carbon comes with Laravel which is awesome, so we can just import Carbon into our controller and make it work.