how to get number of views that your plugin use

Bring Your Business to LifeSupportPopular Widgethow to get number of views that your plugin use

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #355185
    Xpark Media
    Keymaster

    @amenzoweb,

    Yes, you should be able to display the views under each post by using get_post_meta() function. bellow is an example.

    echo get_post_meta($post_id, '_popular_views', true );

    $post_id is the id of your post “_popular_views” is the custom post value added to each post, that is if you did not changed this setting. Otherwise see “Custom Field” field in the widget.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.