Questions tagged [cookies]
An HTTP cookie is a small piece of data sent from a website and stored in the user's web browser while the user is browsing it.
379
questions
3
votes
1
answer
5k
views
Website Loads Twice Unnecessarily
When I use tools.pingdom.com, I can see that my website is loading twice unnecessarily. The first time www.junkluggers.com is loaded, a cookie is set. Then part way through the loading process, www....
3
votes
2
answers
3k
views
WordPress Ajax Login without page reload
I'm currently developing a WordPress theme where I want the user to be able to upload images before he register or log in to the site.
The initial problem was, you can't upload images to WordPress ...
3
votes
3
answers
6k
views
Setting a redirect cookie in wordpress
I've been searching on the net for a solution to my problem all day, but I can't make sense of anything I see, since I know absolutely NOTHING about coding.
What I'd like to do:
I'd like to set a ...
3
votes
1
answer
12k
views
Do I use cookies?
I have made website in wordpress, and now client wants to know do this website use cookies?
I dont know too much about it becouse i never use it, but i need to be sure. If I make websites i use ...
3
votes
1
answer
539
views
Authentication/API Questions
We are trying to use S2Member to manage our WP site and memberships for a Flash program that we are launching. We'd like to use S2Member to authenticate the user when they login and remain logged in.
...
3
votes
1
answer
4k
views
How to transition cookies from .subdomain.domain.com to .domain.com with minimal impact on users?
I need to extend the cookies of a subdomain.domain.com to all of the domain.com's subdomains (.domain.com in cookie terms).
I am trying to minimize the impact of this transition. It seems that ...
3
votes
2
answers
7k
views
Share WordPress Login Cookies Between Two Subdomain Installs
I have two wordpress installs each on their own sub domain.
sub1.domain.com and sub2.domain.com
I want to share the login information between sub1 and sub2. I already have configured them to use the ...
3
votes
1
answer
408
views
Security error WP 4.0 + WP phpBB Bridge [closed]
so today I updated to 4.0 (glad I had backup).
Everything was working fine until I tried to publish a post. There I got Are you sure you want to do this. Also had Cheatin' Uh under appearance->...
3
votes
2
answers
4k
views
wp_logout action not working
I'm trying to remove some cookies set to control persistent login when the user specifically wants to log out of a website.
I thought it would be as simple as:
function remove_user_cookie() {
...
3
votes
0
answers
1k
views
$_SESSION variables lost during OAuth callback
When I attempt an OAuth handshake, the first step is a GET call to obtain an access code like so.
# Redirect to request authorization code
$url = $this->get_authorization_url();
header("Location: ...
3
votes
1
answer
2k
views
How to resolve error “Cookies are blocked due to unexpected output.”?
I am facing an error as per below at admin panel login.
"ERROR: Cookies are blocked due to unexpected output."
I've tried several solutions like,
Log checking (No logs are showing in log file)
...
2
votes
2
answers
8k
views
Get user ID after logging in
I've been asked to add a sort of safety mechanism to a site where a user can only access their profile if they have a cookie set after logging in, and they can only have a maximum of 3 cookies. I've ...
2
votes
2
answers
5k
views
Gravity Forms skip form if already filled out using cookie?
I have a Gravity Forms page set up where, after you fill out the form, you are taken to a confirmation page where you can download some resources.
The problem with this setup is: Let's say someone ...
2
votes
3
answers
6k
views
ERROR: Cookies are blocked or not supported by your browser
I'm getting this error while trying to log in:
ERROR: Cookies are blocked or not supported by your browser. You must
enable cookies to use WordPress.
Yet I have cookies enabled and not blocked. ...
2
votes
1
answer
3k
views
How does the "authentication unique keys and salts" feature work?
I'm trying to find some information on how the authentication keys and salts work in WordPress, but unfortunately I wasn't able to find anything useful. All I got is that the keys should be random, ...
2
votes
1
answer
2k
views
What is cookie "U" from domain ".adsymptotic.com" found on the WordPress page? [closed]
On a landing page of our WordPress site, I find a cookie "U" from domain ".adsymptotic.com" as the image below shows. Could you please let me know where this comes from because ...
2
votes
1
answer
3k
views
Rest API authentication issue when called from fetch request in bundle.js
I'm able to use the Rest API for calls that don't need auth, but I'm having an auth issue for the routes that require it. Here is part of a .php view template for an admin page:
<div id="...
2
votes
2
answers
9k
views
Deleting cookie to logout
Would be potential problems if I delete wordpress_logged_in_47d1523b... cookie using javascript? Is there something additional that wp_logout does?
2
votes
1
answer
192
views
Setting cookies in Wordpress
I am trying to set a cookie on my site and wanna switch the style sheets using this cookie.
I've tested a normal function but it does not work.
I've put below code into my functions.php
add_action('...
2
votes
1
answer
5k
views
Get wordpress stored cookies for custom login
I've created a custom login box. I'm using wp_signon() method. Everything works well.
Also i have a Remember me checkbox so i can remember user credentials next time. I know i can do it my own way of ...
2
votes
1
answer
3k
views
Using a nonce in a Custom Login Form
I am trying to create my own login form for WordPress using wp-login.php as a template.
In the form that is used to collect login information from the user (lines 680 through 703 of wp-login.php), ...
2
votes
1
answer
178
views
Can WordPress store comment cookies on two different computers?
It's usual that WordPress stores comment author name and email in the user's browser cookies, so next time the visitor has to comment, they have their name and email already filled in automatically.
...
2
votes
1
answer
2k
views
Login redirect_to loop with reauth=1, cookie expiry set to 1 year in past
(I've resolved this - sequencing error in wp-config.php - thanks to this answer elsewhere).
I've moved a site dev to production and everything is working correctly except the login form, which is ...
2
votes
1
answer
1k
views
How to delete Password Protected posts cookies when a user logged out from the site
I wanted to delete all the cookies set for password protected posts when user logged out from the site after going through those Password protected posts.
Is there any function to do this?
2
votes
1
answer
2k
views
Searching hook to set cookies before <head> and avoid "headers already sent"
I have written a plugin that sets cookies, and need to avoid the "Headers already sent" PHP error by placing the code at the very top before the head section. Themes usually place wp_head just before ...
2
votes
1
answer
12k
views
How to get login data (session) outside WordPress?
I guess WP uses a PHP session (or a cookie) to save login data, right?
I have a website, which uses WP as a CMS, but display (and create) content from outside. I allow anonymous posts, by simply not ...
2
votes
1
answer
4k
views
Cookie value cannot be read until I've logged into the WP admin
Once logged into the WP admin, I can refresh the front-end and see my cookie's value outputted as "hello world". If I log out of the admin, then refresh my front-end, the cookie's value is now "...
2
votes
1
answer
3k
views
Serving Cookies From A Different Domain or Sub-Domain
The WordPress Codex clearly states that if your website is served from example.com, for the sake of performance, you can have the cookies served from www.example.com by adding this to your wp-config....
2
votes
2
answers
10k
views
Wordpress Redirect based on the prescence of a cookie
I have a tricky situation....
I'd like to check for a cookie. If it doesn't exist then then redirect to an internal wordpress page, and set a cookie. And then carry on browsing the site. But i get ...
2
votes
1
answer
665
views
How to switch css files according to devices and button click?
I am trying to enqueue a responsive css file if the website is opened on mobile devices.
Also I want to switch / enqueue a default or non-responsive css file when a button is clicked.
The non-...
2
votes
1
answer
1k
views
jQuery cookie not working properly in wordpress
I make my own accordion menu with html + jquery its working perfectly to forth level, then i add a cookie code from net and do some extra work it also work 100% perfectly in html.
My complete HTML + ...
2
votes
1
answer
4k
views
Secure wordpress_logged_in cookie
I have to make sure, that the Wordpress cookie set after successful log in, "wordpress_logged_in_[salt-sth]" is set to be available for secure connections only.
It looks like that it´s a filter used ...
2
votes
1
answer
5k
views
Set cookie then immediantly refresh the page
I wrote a small WordPress plugin (mobileesp-for-wordpress) that will redirect mobile users to the mobile site. It's based on mobileesp.
The plugin itself works fine the problem is I added an option to ...
2
votes
1
answer
3k
views
Can't GET draft posts via REST API from headless frontend
I have a headless install of Wordpress on v5.4.0. The frontend can't GET any post that is in draft status, though when accessing the API url directly the data is returned without an issue. I'm ...
2
votes
2
answers
5k
views
Login cookie across multiple domains on network w/ mapping
I have a subdirectory Wordpress network with >50 sites, it's on a primary domain of wordpress.example.com.
A client, johndoe, within my network will (intentionally) have a back-end that includes the ...
2
votes
2
answers
773
views
Can't login after URL change
I changed the settings first, then relocated WP to another location. Now I can't access wp-admin
ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use ...
2
votes
1
answer
46k
views
Logout user and delete cookies from the client side?
I'd like to be able to logout the user. I can do this by calling wp_logout() on the server but if the user drops connection is there a way to log them out?
The wp_logout() method clears the cookies. ...
2
votes
1
answer
3k
views
Subdomain login problems
Tonight I installed a clean copy of WordPress on my local machine, with the intent of trying to set up a subdomain multisite installation. (I've got lots of experience using subdirectories, but this ...
2
votes
2
answers
5k
views
How to set different cookies for logged in admin users and logged in non admin users?
I would like to identify admin users and non-admin (but logged in) users through cookies. I need this feature because I use Hyper Cache (which uses cookies to identify those who send pages in cache): ...
2
votes
3
answers
1k
views
Making a Custom Post type only visible to non-users via a specific link
I am working on creating a small web-app with wordpress as the framework. It allows you to input a customer and in turn sends an email to the customer with a link back to the website in order to ...
2
votes
1
answer
414
views
2 wordpress blogs with 1 users table and 1 login
I have been trying to achieve that and I did without the 1 login part
I fallowed this post/tutorial , but no matter what I do I can not get it to login ones for both websites.
My set up is sitename....
2
votes
0
answers
574
views
Log in user using Wordpress REST API
I am having problems authenticating a user after logging in using a custom endpoint using the WordPress REST API.
I'm aware that this is not the perfect approach but I am just trying to make a few ...
2
votes
1
answer
330
views
Popup Cookie Wordpress select language and section (Elementor)
I need to show a popup where the user can choose the language and which section to open (partners, customers, support) and that this choice is kept in the cookies so that the next time he returns that ...
2
votes
1
answer
220
views
Random popup image per user with no repeat
I am pulling images from an ACF gallery that resides on another page. What I intend to do with this is to have these images displaying full screen on my home page on a popup every time the page loads. ...
2
votes
0
answers
251
views
Redefine cookie domain for subdomains
I have done all the research on this question but none of it is working.
I have an application consisting of a WordPress site at "domain.com", and a CakePHP/Angular application at "sub.domain.com". ...
2
votes
1
answer
85
views
Logins through alias
My site is hosted by a university that runs all external traffic through an alias. The actual URL of the server is accessible only on campus. Right now I have the site address set to the alias and the ...
2
votes
1
answer
230
views
SSO autologin Wordpress + Ajax
That one keeps me awake at night.
The problem is that the user is properly logging in, but AFTER page refresh and should be immediately logged in without page reload. Need a fresh eyes to look at it.
...
2
votes
2
answers
5k
views
Configuring WordPress Auth Cookie Expiration
I'm trying to configure the WordPress cookie expiration time, but for some reason it's not working. I went here:
https://developer.wordpress.org/reference/hooks/auth_cookie_expiration/
And put the ...
1
vote
4
answers
4k
views
Setting Cookie with init hook causes 'header already sent'
Based on research here and elsewhere, I have the following code that sets a cookie on a site:
add_action( 'init', 'my_set_cookie',1 );
function my_set_cookie() {
if (! $_COOKIE['mycookie']) {
...
1
vote
1
answer
4k
views
Remove Cookies From Wordpress Core
I'm developing a custom theme and i understand Wordpress does come with some built-in cookies? With the new GDPR regulations coming I would like to remove these - I believe they are only there log-in ...