WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack Post Views
[resolved] Custom Post Types views bug (3 posts)

  1. Jonathan Dingman
    Member
    Posted 10 months ago #

    Found a small bug with custom post types and the pending status of them.

    When a custom post type is not yet published, it throws this error:

    Warning: number_format() expects parameter 1 to be double, string given in /home/user/public_html/wp-includes/functions.php on line 155
    views

    This is likely because it's trying to query a post that is not yet public and therefor, no stats are available.

    Also, probably worth adding an option to decide which post types to query, having it for every CPT is likely making the page load slower when I don't actually want that data being retrieved or tracked.

    http://wordpress.org/plugins/jetpack-post-views/

  2. Steven Lambert
    Member
    Plugin Author

    Posted 9 months ago #

    Thanks for letting me know, I'll get it fixed in the next patch. I'll also set an option for displaying the view stats on the All Posts page so you can enable or disable it if you want to.

  3. Steven Lambert
    Member
    Plugin Author

    Posted 8 months ago #

    Fixed in version 1.0.9 (also added option in Settings page to disable the Total View column)

Reply

You must log in to post.

About this Plugin

About this Topic