Closed KeenGamer closed 5 years ago
Hi there,
The actual number is stored on the database as an integer, no formatting at all. The formatting takes place after the plugin retrieves the data from the database.
When you say:
If we want to use the field somewhere else ...
You mean for example displaying the views count of a post somewhere in single.php
?
Well, if I go and check the table postmeta to see data for one post, then meta_key views_total has meta_value 4,498 for example. And we take this field to another plugin which cannot work with commas in numbers...
That data on your postmeta table isn't coming from WPP. Most likely from some custom code or from another plugin.
Hmhm, ok, will try to find it out. Because the author of the theme told us that you are the author of the figure which is used... Where do you save the data, what table?
WordPress Popular Posts stores its data in two tables: popularpostsdata
(total views count, a.k.a. "All-time") and popularpostssummary
(ranged data, eg. "last 7 days").
Thank you.
Hello, is it possible to write into the database as a number without the comma? If we want to use the field somewhere else, it is not possible because for example 2,351 views should be simply 2351. Or where can we change it?
Thank you.