Articles of cookies

Error : Cookies are blocked or not supported by your browser

I have a multisite WordPress installation. When I am logged in as a super admin from the main website, and go to the dashboard from the main site into another site, it asks me for login details. When I enter the details, it gives me an error: ERROR: Cookies are blocked or not supported by […]

Cookie with referral URL

I want to write referral URL to cookie and use it at some point to echo that referral URL on my website. What is the best way to achieve this? Thank you

How set a cookie from PHP and get it without refresh

I know that when use setcookie() function it create headers, and after refresh it will be available in $_COOKIES, but i need a mechanism to set cookie in this page without redirect, but to be in the browser cookie. If make something like this setcookie(‘my_cookie’,’tmp_val’); $_COOKIE[‘my_cookie’] = ‘tmp_val; It is good for case when you […]

Database alteration: users who voted

I have a post voting system that stores and displays the vote as an integer. When someone clicks on plus the vote increases by 1, when minus – decreases by 1 (exactly the same way as on this website). The problem is that the votes are cookies-based, so when these are refreshed the user can […]

Cookie set without HttpOnly flag

I try to add cookie information but i have no result. The tool sends me the same information. I trying to displayed the mention HttpOnly after path parameter => “Parameter : PHPSESSID=jndfbcev6hie1jm02btk19grs1; path=/ ” I’ve configured WP with those options without succes: @ini_set(‘session.cookie_httponly’, true); @ini_set(‘session.cookie_secure’, true); @ini_set(‘session.use_only_cookies’, true); and modified the header and the htaccess […]

Using Cookie Data For WP_Query Loop

I’m trying to retrieve data set in a cookie and use this to run a query. I’ve set the cookie in functions.php like so; add_action( ‘init’, ‘resultsCookie’ ); function resultsCookie() { setcookie( ‘your-results’, ‘18,17,11,8,10,27,26’, time() + 3600, COOKIEPATH, COOKIE_DOMAIN ); } While I can echo the string, I can’t seem to get this functioning within […]

How can I set up a splash page that is redirected to only one time for the visitor?

I would like every new visitor to be redirected to a splash page upon their first visit. They need to enter their email/submit in order to get into the site. This isn’t the standard login type of arrangement, I don’t want them to have to log in or hit this splash page again the next […]

Referrer URL with jQuery or Javascript – Cache & Referrer URL Issue

Hope someone can help me : ) What Im trying to do is, get the first visit referrer and send it to form. We user Contact form 7 plugin, so I created a hidden input, get the referrer URL and assign that value of referrer to that hidden input field. Everything was working fine, till […]

Best method to show modal only once

I would like to display a modal-window to first time visitors of my site. After that it should not be visible anymore for that visitor. What is the best method to go about this? Normally I could use cookies, but what is best practice when it comes to WordPress? Looking forward to get some advice […]

How to read third party cookie to access password protected pages

does anyone know a quick and simple way to also give access to a WordPress standard password-protected page if there is an existing third party cookie on the user’s machine? I need to see if someone is already logged into another platform, and if so give them access WITHOUT having to also enter the WordPress […]