Ok, atfer adding wp_head under the </head> tag it worked. What is this tag for? Because I’m using <?php get_header(); ?> which calls header.php. I even put the wp_head inside the header.php.
EDIT: Now it adds a blank space on top of my page and it’s adding unwanted tags! Any way to make the plugin work without this wp_head tag?
You can’t. You need the header tag not just for my plugin. Read http://codex.ww.wp.xz.cn/Plugin_API/Action_Reference/wp_head
I don’t really need it though, never did.
Anyway for those who don’t want the codes generated by wp_head + remove the admin bar, here’s the code for functions.php:
remove_action( 'wp_head', 'rsd_link' );
remove_action( 'wp_head', 'wlwmanifest_link' );
remove_action( 'wp_head', 'wp_generator' );
remove_action( 'wp_head', 'start_post_rel_link' );
remove_action( 'wp_head', 'index_rel_link' );
remove_action( 'wp_head', 'adjacent_posts_rel_link' );
remove_action( 'wp_head', 'wp_shortlink_wp_head' );
add_filter('show_admin_bar', '__return_false');
Because so far the plugins you are using doesn’t hook to wp_head. As part of the theme guidelines, you are suppose to have it.