Simple function to get the current post’s thumbnail/featured image, but to return it as an array so you can get the thumbnail url, the thumbnail width and the thumbnail height. In the example I’m getting it to use the thumbnail with a lazyload script (specifically this one https://github.com/tuupola/jquery_lazyload). Replace thumbnailsize with either the name of […]
Returns a list of the groups the current logged in user is a member of
Returns the url of the logged user’s profile e.g.
The Yoast WordPress plugin adds the Facebook open graph markup to your WordPress head if you enable it. It takes the locale setting from whatever language you have set in the WordPress general settings. You can change it in the settings to whatever locale you need or, if you want to keep the WordPress language […]
Add this to your theme’s functions.php to remove the search schema that the Yoast WordPress SEO plugin puts in the WordPress head. Particularly if you’re not using the WordPress search on the site!
Removes the new emoji scripts which are in the head from WordPress 4.2 up. Put this in your theme’s functions.php
To completely disable all types of automatic updates, core or otherwise, add the above to wp-config.php file:
A simple conditional if statement for custom post types i.e. display different content if it’s the defined custom post type. Just replace custom-post-type with the ID you have given your custom post type in register_post_type within your theme’s functions.php (usually) and then echo the content you want blah blah.
Simple function to print a list of tags which the current post is tagged with e.g.
This function returns the values of the custom fields with the specified key from the specified post. This is the simplest method of simply echoing out the value of a WordPress custom field on a post or custom post. Just replace custom-field-name with the name of the desired custom field you want to echo out.