Add this into the model
protected function serializeDate(DateTimeInterface $date) { return $date->format('Y-m-d H:i:s'); }
Add this into the model
protected function serializeDate(DateTimeInterface $date) { return $date->format('Y-m-d H:i:s'); }
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.
This is a really neat, lightweight and simple was to add a fade in onto your page when it loads.
Remove the prepended ‘Category:’ or ‘Archive:’ when trying to echo the name of the archive in WordPress.
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.
To add a simple fade-in when the page loads, PURE CSS (No Javascript) – add this to your CSS.
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.
The default WordPress excerpt character length can be changed by inserting the below snippet into your functions.php.
Change 20 to however many characters you want to limit your excerpt to.
Read More
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.