• Hi

    When I copy a post, the amount of views get copied too.
    This of course makes no sense because the new post is new and should have zero views.
    Is there a way to fix this?

    Thanks

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

    (@dfactory)

    Hi,

    Making a copy of a post is not a WordPress feature, so you’re using a plugin for that – question is which one? Additionally PVC does not store data in post meta – it is stored in a separate table which does not have a new record created when you make a copy. In other words, post views should not be the same for a duplicated post – it should be 0. Maybe your theme/copy plugin does something extra which does not come from PVC itself? Can you ask the developers of the copy post feature about it and let us know their feedback?

    Thread Starter KNEET

    (@kneet)

    Hi

    Makes sense.

    I currently use: Yoast Duplicate Post.

    I found not much in settings, however it has a settings/field that says ‘don’t copy these fields’. So we could use that?

    Cheers

    Plugin Author dFactory

    (@dfactory)

    I doubt that would work. The views count is assigned to a post by their ID (post ID). When you create a new post (by adding new or duplicating, does not matter) a new post entry is created with a new ID in the database. There should be no respective post views records for this new post, unless it is stored in post meta. PVC does not store views count in post meta, as mentioned above, but your theme can do that additionally (for some reason) and display it in a custom way, even though the copied post would not have a views count data assigned in PVC.

    So the best answer would be to find out what happens in your theme related to the views count – is there anything added, customized? Or the data is coming from PVC as is.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.