News for hackers. Stuff that matters.

Ask HN: Any WordPress Developers here that can help me?

Hey there.

I'm trying to find out what cookies wordpress sets automatically for all users?

I'm creating a page count function (as I dont want to use yet another plugin) and at the moment it is counting everytime I press f5. I just want to be able to do it only once.

Thanks for your time. I would have usually put this on stackoverflow but the community isnt to fond of broadish questions nor ones without code / specific problems.

( 4 comments | 3 points | on HN )
Re:Ask HN: Any WordPress Developers here that can help me? by giaour on Saturday January 10, 2015 @09:54PM (#8868853)
Any reason you want to do this in WP and not using a javascript solution like Google Analytics?

Backend page view tracking is not compatible with most forms of response caching.

Re:Ask HN: Any WordPress Developers here that can help me? by peacemaker on Sunday January 11, 2015 @12:18PM (#8870480)
I write WordPress plugins for my business and if I want to manage cookies I use something like https://wordpress.org/plugins/wp-session-manager/. This will give you full control.
Re:Ask HN: Any WordPress Developers here that can help me? by saluki on Monday January 12, 2015 @10:13AM (#8874221)
You can set/read your own cookies when developing on wordpress.

I usually us the jQuery cookie plugin for javascript.

You can set/read cookies using php as well.

Re:Ask HN: Any WordPress Developers here that can help me? by hsx on Saturday January 10, 2015 @09:16PM (#8868773)
I'm not too familiar with WordPress but couldn't you just store the page count in the database and update it periodically?