Support

Account

Home Forums Pre-purchase Questions Post Views Counter

Helping

Post Views Counter

  • Hi,

    is it possible to create a custom field for page views?
    Everytime when a post is loaded the view counter should increase and will be saved in the custom field.

    best regards,
    Sascha

  • In the template file, get the field, increment it and then save it

    
    $count = get_field('counter_field);
    $count++;
    update_field('counter_field');
    
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.