Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

add_theme_support is not working on functions.php

Tags:

While developing a new theme on Wordpress, I just noticed that add_theme_support is not working for me. I called <?php wp_head();?> before the head ends and <?php wp_footer();?> before the body ends. I am using Wordpress version 4.1.1. Can anyone help me sorting this out? I am tired after trying so many times but no luck :(

like image 887
Gamer Avatar asked May 12 '16 18:05

Gamer


1 Answers

On which hook did you add add_theme_support? Please try after_setup_theme hook like the example below:

add_action('after_setup_theme', 'my_function_after_setup_theme');
function my_function_after_setup_theme() {
    add_theme_support('automatic-feed-links');
}
like image 76
Stanimir Stoyanov Avatar answered Sep 28 '22 02:09

Stanimir Stoyanov