• Resolved zalak31

    (@zalak31)


    Hello,

    I want to display a page view using function file. I used a do_action( ‘pageviews’ ); in one add_action but i can not able to print a page views.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Gennady Kovshenin

    (@soulseekah)

    do_action(‘pageviews’) only outputs a placeholder for the views.
    You will need to enqueue the scripts and make sure that some crucial JavaScript is running on the page.
    PageViews relies on this to both increment the counter and display it.

    Have you added add_action( ‘after_setup_theme’, function() {
    add_theme_support( ‘pageviews’ );
    }); to the theme? This will very probably add everything that is needed in terms of CSS and JS.

    https://github.com/pressjitsu/pageviews#customization

    Thread Starter zalak31

    (@zalak31)

    Hello,

    Thanks for replay and yes i added
    add_action( ‘after_setup_theme’, function() {
    add_theme_support( ‘pageviews’ );
    }); to theme file.

    Plugin Author Gennady Kovshenin

    (@soulseekah)

    Without looking further at your setup it’s impossible to tell.

    Can you please email support@pressjitsu.com with further details?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘pageview issue’ is closed to new replies.