This WordPress snippet will allow you to insert WordPress shortcodes into your theme-/templates - using WordPress built-in function do_shortcode()
Tag: wordpress development
This snippet will let you define a new default excerpt length for the WordPress excerpts output. The following example will set the default excerpt length to 20 characters.
Custom post types are not included in the WordPress search results by default - this snippet allows specific custom post types to be queried and searched by WordPress.
This snippet will use WordPress built-in "mobile detect" function "wp_is_mobile" to create a simple shortcode that can hide certain parts of your content from mobile visitors and-/or desktop visitors.
You can easily force specific pages to be secure in wordpress using the following simple little snippet. Just add the following snippet to the functions.php of your wordpress theme and specify the post / page ID desired.
This snippet will allow WordPress contributors to upload images on your site.
This snippet is very handy if you wish to add category ID to WordPress body and post class for ex. targeting CSS styles and such.
This snippet will allow you to define a custom truncate length of the WordPress post title in your template files.
This snippet will add a shortcut link to your WordPress theme editor.
This snippet grabs and displays the number of followers the specified user has.