• Resolved coldpumpkin

    (@coldpumpkin)


    So, I installed the plugin and configured it (no major changes) and added the php line. I keep visiting a post and the counter doesn’t change, it stays at 0.

    I even tried logging out and visiting (it could be because I’m an admin) but doesn’t change also.

    What could be wrong?

    https://wordpress.org/plugins/wp-postviews/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter coldpumpkin

    (@coldpumpkin)

    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?

    Plugin Author Lester Chan

    (@gamerz)

    You can’t. You need the header tag not just for my plugin. Read http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head

    Thread Starter coldpumpkin

    (@coldpumpkin)

    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');
    Plugin Author Lester Chan

    (@gamerz)

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Not working. Count keeps at zero’ is closed to new replies.