The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
38 views

My php code is not being executed

I have a wordpress page that has this code in the text editor part of a web page: This page creates a cookie and houses a etst link that is only accessible to the holder of the cookie.   ...
0
votes
0answers
20 views

Load post conditionally

I am working on a website which displays only 3 posts unless people subscribe for a newsletter. This is done by setting a cookie on validation and inserting this cookie conditionally in my queries. ...
0
votes
1answer
26 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() { ...
0
votes
0answers
11 views

Rss feeds outside the loop, how do I sort by most viewed? Cookie?

I have a wordpress site with aggregated Youtube and Vimeo clips. I use WP RSS Aggregator for this, who doesn't store anything in posts, therefor makes it hard to create a most viewed function. I was ...
0
votes
1answer
33 views

How to set a cookie based on a page Get variable?

I am trying to set a cookie, based on a GET variable from a page. The page URL looks like: mysite.com/?my_var=somevalue I'm trying this, but can't see what I'm doing wrong.. // make 'my_var' ...
0
votes
1answer
31 views

How to set a cookie for logged in users to md5($user->ID . “my_secret”)?

For all logged in visitors of my WordPress website I would like to set 2 cookies based on their user ID - so that I can use their user IDs in WordPress-unrelated PHP scripts at the same domain. In ...
0
votes
1answer
41 views

Session Cookie security questions

I am a .NET developer but I also administer all of our corporate websites, which are all Wordpress. I inherited the sites from someone who is no longer at my company. My company recently spent a ...
1
vote
1answer
138 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 ...
0
votes
1answer
63 views

Set cookie for visitor

I'm writing a new plugin that will allow visitor to vote. After a visitor rated a post, I'd like to block double voting. I think the better way to do it is using cookie, but of course I can't insert ...
0
votes
0answers
40 views

Get user info on sub domain from WordPress installed on main domain

I have WordPress installed at www.mainsite.com. When visiting the sub domain subdomain.mainsite.com, I would like to grab the user's email address if he or she is logged in on the main site. ...
0
votes
0answers
127 views

Wordpress Varnish Age=0 or Not Caching (Cookies?)

I'm using Wordpress 3.8.1 and Varnish 3.0.5. I'm sure the Varnish is not caching, because of the VCL nightmare. And i also don't know where is the very standard / correct VCL for Wordpress. My ...
1
vote
1answer
113 views

Setcookie works on admin but not front end

I have a simple function to set a cookie to the value of whatever parameter is attached. For example, if I visit http://example.com/?devsource=http://dev.example.com/ it should set the value of the ...
2
votes
1answer
212 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 ...
0
votes
1answer
78 views

One time login on 2 different Wordpress sites

Im trying to figure out how to login one time to mydomain.com and being automatically loged in to mydomain.com/blog . I have figured out how to share tables (so that the same users on my main site, ...
2
votes
0answers
150 views

Cookie is not marked as HttpOnly [closed]

I am trying to get my wordpress driven website to be PCI compliant and the report states that we have a failure due to: "Cookie is not marked as HttpOnly: 'wordpress_test_cookie=WP+Cookie+c heck; ...
0
votes
0answers
42 views

My website resets when accessing the index page

So my wordpress theme and website is on a stage server, since it's under production. And this issue happens once in a while. Basically, if I log in as a user, and when I enter the index page, the ...
0
votes
0answers
308 views

Wordpress Cookies - wp_set_auth_cookie

I would like to make the login working to all of my wordpress sites. They are single installs, so no multisite plugins can help. I decided to go with the cookies. I store the users in the same ...
0
votes
0answers
110 views

How to handle cookies from a WordPress plugin on a cached page?

I'm attempting to write a plugin that can work with cookies on a WordPress site that uses page caching (why?). I've been following this tutorial on Esanctuary.net. I'm trying to write to the ...
0
votes
0answers
53 views

Cookie in custom page template

I need to set a cookie on a custom template (page_splash) so that the splash page only shows on the first visit every 24 hours. I have tried lots of variations of code at the top of my custom template ...
0
votes
3answers
210 views

Prevent installation of style.css cookies and file caching

I'm having a problem which I have never encountered before. When I update my style.css file within my child theme, the webpage does not use the new style. I have pinpointed that to a cookie within ...
1
vote
0answers
46 views

WP not logging in at first time

I've been experiencing a weird "bug" in my website which I have a form in the front page to do the log in, it doesn't log, redirects me to the WP-login.php and it says the Cookies may not be active in ...
1
vote
0answers
150 views

How to share WordPress session and cookies between domain and subdomain?

I have missed a lot of time by searching answer to my question. For today I have two WP installations on the one server and one DB but with different prefix. I already shared users data and meta ...
1
vote
1answer
494 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. ...
1
vote
1answer
205 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 ...
0
votes
1answer
32 views

Error when setting cookie

I get this error when trying to set a cookie on a WP page. Warning: Cannot modify header information - headers already sent by(...) Any help here? It worked fine when I did the php outside of ...
0
votes
1answer
70 views

Authentication from sub-folder non-wp cookie WordPress

I have a question about user authentication in my WordPress Multisite site. My site is http://www.drezzy.it that has its own user db with a login and logout system. This is a non-WP website. When you ...
0
votes
0answers
29 views

Override Theme Customizer Cookie Expiration

I'm working on a Multisite network which has a forked/custom signup form. As part of the signup success process the user is automatically logged in, given a password, etc. I've got this all strung ...
0
votes
1answer
53 views

set cookies for my whole site is not working

I'm trying to set the cookie to my site to hide a div on click action. Description of the problem. I wanna set the cookie for the whole site not for particular page. I'm setting the cookie on click ...
0
votes
1answer
240 views

Why is PHP Cookie via plugin only set when logged in as Admin and not regular users? and other questions

At first I thought it was a browser issue, but it looks like my code only sets a cookie if the user is logged in the administrator. If you are not logged into the Administrator account then it does ...
0
votes
0answers
91 views

Create and update Custom Cookie based on multiple GET and POST Values for first time visitors?

I am not exactly sure the most efficient way to write this code. I collect custom data in my forms and also in my url via get such as: Name utm_campaign URL Referrer ID Among many more. Do I ...
1
vote
0answers
65 views

Login cookies set as wrong domain

I'm building a plugin that allows oauth2 logins from providers (eg google). My code is setting the wordpress_logged_in_{$hash} cookie domain as /wp-admin, for some reason, whereas using the normal ...
1
vote
1answer
173 views

How to detect that site is hosted on WPEngine?

Is there anyway to detect that WordPress is hosted on WPEngine? The reason why I need to know it in their approach to eliminate cookies. But my plugin relies on cookie and can't work without it. So I ...
3
votes
1answer
441 views

Using wp_set_auth_cookie for custom user account system

I've built a custom user account system using a custom post type. I was wondering whether it is safe to use the built-in function wp_set_auth_cookie($user_id, $remember, $secure) Wordpress uses for ...
0
votes
1answer
78 views

setcookies and header send

I put simple php condition in the header.php of template as this : setcookie("test_time_".$cookie_id."", $cookies_times, time()+3600); The result always as this headers already sent , i use this ...
0
votes
0answers
47 views

WordPress Auth Cookie

I have 2 domains pointing on same WP installation, I want when user login under host1 (s)he be redirected to host2 and be logged in there too. Obviously because cookies under host1 aren't sent for ...
1
vote
2answers
443 views

How to setcookie if is_page('page') ? should I use add_action('init') or there is another action?

I want to setcookie if is_page('arabic') or is_page('english') then redirect to home_url() only if the page name/slug arabic or english, I think that init action happen before the code determine the ...
0
votes
1answer
239 views

How to set custom cookies in Wordpress after a form is filled on a page

I have built a custom template for page in Wordpress: page-xyz.php This page has a some content. I want to check cookie. What I want to do is: If cookie is set: //show page content else //don't ...
0
votes
0answers
142 views

Wp-admin error with cookie sharing while using SSL

I am using Wordpress 3.6 My setup is 3 separate wordpress installations on the same server: www.example.com, secured.example.com, my.example.com All 3 domains use WP-Orphanage Extended plugin so ...
3
votes
1answer
106 views

Do Cookies Need to be Sanatized Before Being Saved?

I recently wrote a plugin and now I'm backtracking a bit to sanitize any and all user input. I know that I should sanitize anything that comes from $_GET or $_POST as a user can insert malicious ...
1
vote
1answer
645 views

Extending auth_cookie_expiration based on user role

I'm trying to extend the lifespan of the authentication cookie, but only for administrators. My code in functions.php is: add_filter( 'auth_cookie_expiration', 'change_admin_cookie_logout' ); ...
0
votes
0answers
64 views

Accept (once only) policy page on login

I'm developing a simple application on WP that requires the user to accept a policy page on first login. If they accept, they're redirected somewhere (homepage), if not, they're redirected somewhere ...
1
vote
1answer
2k 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 ...
0
votes
1answer
188 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), ...
0
votes
1answer
24 views

How to save a viewer specific option

A minimal example of my problem would be default background colour is white a custom sidebar widget offers to switch background colour to green when switched to green, background shall stay green ...
0
votes
1answer
148 views

Set a cookie only in single posts

I'm trying to set a cookie when a user is on a single post. I'm keeping track of how many single posts he has read this month. I have two problems: I have a custom template and added the following ...
1
vote
1answer
505 views

Set authentication cookies to be shorter but then extend with every page load

I'm trying to get around the otherwise very insecure way of Wordpress handling authentication cookies. I mean, having the cookie expire in 2 weeks only if I build a membership site is obviously not ...
0
votes
0answers
420 views

WP Logs me out after updating anything on dashboard

Not sure what is going on here but my live site kicks the admin out every time they change something in the dasboard. For instance when an admin updates a page the url looks like ...
0
votes
1answer
632 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 ...
0
votes
3answers
610 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 ...
1
vote
1answer
76 views

Current path on page in functions.php

How can I get the current path of my page? I know how to do it inside a template file, but I need it inside functions.php. And it has to be before the send_headers hook, because I'll use this info to ...