By default shortcodes are only processed in post/page content. However you can use them in many other places, you only have to enable them for each field you want. Here’s a little tutorial of how to use shortcodes in widgets, excerpts, comments, theme files, user descriptions, and category/tag/taxonomy descriptions.
Check if a WordPress plugin is active
If you want to check if a WordPress plugin is active, just use the is_plugin_active() function. The function takes a single parameter, which is the path to the plugin, as shown in the example below:
Showing custom post types on your home/blog page
By default, WordPress shows only the “post” post type on your home/blog page. If you want to display your custom post types you have to add a filter (pre_get_posts). So let’s suppose we have created the post types “portfolio and gallery” in addition. To add these, open your theme’s functions.php file and paste the following [...]