Results 1 to 7 of 7

Thread: Php error, views

  1. #1
    Thread Starter
    Expired Customer ramirulo's Avatar
    Join Date
    Jan 2020
    Posts
    37
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Php error, views

    Hello,

    It seems that since the new update of PHP, this error appears in the hit counter.

    Could you tell me the code to solve the error in this line?


    error.jpg

    PHP Code:
    /**
     * Updates post meta with increased page views count
     */
    function tr_process_page_view(){

        
    $post get_queried_object();
        if ( ! 
    $post ) {
            return;
        }

        
    $views get_post_meta$post->ID'view_count'true );

        
    $shouldLogView apply_filters'tr_log_page_view'true );
        if ( 
    $shouldLogView ) {
            
    update_post_meta$post->ID'view_count'$views );   /*This is line 27*/
        
    }

    }

    /**
     * Stops page views from counting more than once per an ip address
     */ 

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    41,006
    Thanks
    170
    Thanked 3,409 Times in 3,280 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  3. #3
    Thread Starter
    Expired Customer ramirulo's Avatar
    Join Date
    Jan 2020
    Posts
    37
    Thanks
    9
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    41,006
    Thanks
    170
    Thanked 3,409 Times in 3,280 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  5. The Following User Says Thank You to jomarkosabel For This Useful Post:

    ramirulo (February 25th, 2020)

  6. #5
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    41,006
    Thanks
    170
    Thanked 3,409 Times in 3,280 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  7. The Following User Says Thank You to jomarkosabel For This Useful Post:

    ramirulo (February 26th, 2020)

  8. #6
    Thread Starter
    Expired Customer ramirulo's Avatar
    Join Date
    Jan 2020
    Posts
    37
    Thanks
    9
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  9. #7
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    41,006
    Thanks
    170
    Thanked 3,409 Times in 3,280 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  10. The Following User Says Thank You to jomarkosabel For This Useful Post:

    ramirulo (February 28th, 2020)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Disable updating View Counter - Views Today, Views Total
    By user2616 in forum Help Using ClassiPress
    Replies: 2
    Last Post: February 22nd, 2018, 09:19 PM
  2. Total views and today's views remain the same
    By amersvoort in forum Report ClassiPress Bugs
    Replies: 7
    Last Post: August 27th, 2015, 08:15 AM
  3. Replies: 5
    Last Post: October 21st, 2014, 04:15 AM
  4. Samcy Total views and views today not working on classipress v3.3.3
    By jamesweb in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: July 15th, 2014, 02:56 PM
  5. [SOLVED] Total Views and Today Views Not showing up ????
    By stolarczykk in forum Report ClassiPress Bugs
    Replies: 13
    Last Post: March 24th, 2012, 07:51 AM