Enhance and speed up your workflow with a collection of WordPress snippets for you, as a developer, to use in your projects. You need Alfred to use these snippets, otherwise you can just copy them from source as and when you need them.
- Download the snippets here
- Double click the downloaded file. Yep. It's that easy.
To use, simply open alfred (With your keyboard shortcut for faster work) and type one of the following commands. Find the one you want and either click it, or hit enter. It will paste the code wherever your cursor is (before you opened Alfred of course).
WP Custom Breadcrumbs
A function which will create breadcrumbs with support for WooCommerce, custom post types, custom taxonomies and the normal pages, tags, archives etc.
WP Custom Excerpt Length
A function to create a custom excerpt length instead of using the_excerpt
.
WP Custom Post Type Loop
Generates a basic loop for looping through custom post types.
WP Defer Scripts
A function which defers the loading of specific scripts. Useful for page speed optimisation and stuff.
WP Remove Version from Scripts
A function which removes the ?ver=
query string from all the CSS and JS which is enqueued.
WP Update Domain
SQL queries to update the domain whenever you need to change it.