The Nimbus Themes add_theme_support WordPress snippet generator can be used to create code for activating WordPress theme functionality like custom backgrounds, logos, HTML5 integration, or post thumbnails. Instead of going through the WordPress API to find ways to activate optional features in your themes or child themes, Nimbus Themes has put together this handy code generator for theme support options.

Why Should I Use This Tool?

add theme support snippet generator interface

Before we delve into its use, it is important to note that this tool is available for free! It is browser based, so it is also easily accessible whenever you need to invoke a special feature. They are no prerequisites to using it however you just need to make sure that the function selected is compatible with your WordPress theme.

The biggest advantage, however, is that you can decide which WordPress function to include in your theme. Not all functions will work with your theme or they may not be necessary for your website. By using the add_theme_support function, you can decide which feature to you and generate code for it.

How Do I Use This Tool?

All the WordPress functions included in this tool are listed along with a ‘Required’ and ‘Validity’ icon next to each function. Required indicates mandatory field properties. Only the domain name and theme slug are mandatory options. No matter which function you select, the code snippet needs to incorporate both options in order to work seamlessly with your theme. Validity, denoted by a green color, indicates if your parameters are correct. In case you enter an incorrect parameter, the validity checkbox changes color to red. There is also a Notes section that enlists special properties for each function for example I will specify that certain properties can only be specified in numbers.

To invoke a function, you simply need to mark “select” in the checkbox next to it. This will automatically start generating code for that function, based on what other parameters you select. One example is Post Thumbnails. Post Thumbnails, now more commonly referred as Featured Images, is a pictorial representation for a post, custom post type or page. When you mark it as “Select”, you may further specify its size. Both the width and height may be specified.

Which Options Are Included?

There are 5 main categories included in this development tool. Some are generic options like title tag and content width. Other categories include Translation Capacity, Post Formats, Images and HTML5 integration. Each of the options available in this code generator are described below.

Translation: Here you must specify directory where the translation files are located. This will help your function.php file locate what to translate.

Post Formats: All post formats like gallery, link, image, quote, status, video, audio, and chat can be embedded in the code.

Post Thumbnails: As exemplified in the example given above, these serve as a visual representation for your code. You can also specify the size of your thumbnail. This is given in the Image category.

Custom Background: A custom background can be invoked. A default image or color can also be uploaded. You can further specify its position and frequency of repetition.

Custom Header: You can upload a default image for the header, as well as specify its text, height, width and color.

Custom Logo: In addition to uploading your own logo, you can specify its dimensions.

Feed Links: This option activates Automatic Feed Links so they can be used for RSS feeds for posts and comments in the <head>.

HTML5: This feature helps to make certain sections of your theme responsive. As an example, you can include HTML5 tagging for your search form or your gallery section.

Title Tag: Choose your own title tag and let your theme control it.

Refresh Widgets: This is a unique option that lets you refresh your widget code only, rather than the entire page. It helps to enhance the functionality of the WordPress Customizer.

What Happens Next?

Once you have finalized your parameters, you simply need to copy the code snippet generated at the bottom of the site page. A Copy to Clipboard option is also given for your convenience. This code needs to be pasted to the functions.php file of your theme admin panel. The recommended practice is that you take a backup of your code before pasting the revised file. Furthermore, it is recommended that you transfer the file using FTP. This will ensure that in case of an error, you can replace an older version.

Adding your own distinctive style to your theme is now easier now that this Nimbus Themes code generator for adding theme support is here.