December 2017
Beginner
458 pages
7h 52m
English
Now that we have the theme_setup function, we need to pass this function into an action. So let's add add_action and the action will be after_setup_theme. The second parameter will be the function we want to run, which is theme_setup as shown here:
function theme_setup(){ // Featured Image Support add_theme_support('post-thumbnails'); set_post_thumbnail_size(900, 600); // Post Format Support add_theme_support('post-formats', array('gallery'));}add_action('after_setup_theme', 'theme_setup');
Now, let's save this code and reload the backend page. As shown in the following screenshot, you will now see that we have the Featured Image section under the Tags section, and we also have support for the gallery format: ...
Read now
Unlock full access