Are you sure it works in other browsers?
WordPress by default drops/unset all unknown variables. Check wp-includes/load.php
inside the function wp_unregister_GLOBALS()
.
I had similar session variable issue and fixed it using (in functions.php)
<?php
// Enable session
add_action('init', 'custom_init_session', 1);
function custom_init_session() {
if (!session_id())
session_start();
}
ie. Call session_start()
during init
instead of in header.php.
Give it a try!
Related Posts:
- Is there anything that Joomla or Drupal can do that can’t be done in WordPress? [closed]
- Custom maintenance page
- Any post install tips after installing WordPress 3.0.1?
- Version Control: Entire site or just pieces?
- Getting a stack trace when an error occurs?
- How to customize the default HTML for WordPress Attachments
- Customizing the Subject Field in WordPress’ Notification Emails?
- How to move wp-content (or uploads) outside of the WordPress directory
- How can I integrate pages written in something other than PHP?
- Maintaining synced staging/production WP sites
- WordPress Multi Site Best Practice
- Sub posts and non unique post_name
- Custom field values in permalink
- How to let a single post have its own domain name
- Redirect to requested page after (custom) login
- Custom protected password page with ACF
- Page load requires a trailing “/” [closed]
- How to instantly delete posts/pages permanently?
- Custom Dashboard Home Screen Options
- dynamic external javascript generated using php
- Show Custom Taxonomy Slug(s)?
- How to re-arrange media uploaded using : media_handle_upload() as per year / month
- How could we customize the all posts page in the admin panel?
- Remove Author Slug & Replace With Username
- Comments Confusion
- Updating Custom WordPress User Meta Field via REST API
- Defined Blogname Override?
- Not sure how I would go about doing this in WP.. related to custom tags
- Remove template drop down for certain pages
- Adding all sub-pages to the menu manager
- Hide devices selection from customizer?
- Add options to the “Screen Options” section on the “Menus” editor
- Split Conference WordPress Page in different years
- Make custom user table column filterable
- Publishing html directly from ftp to wordpress
- how to get the categories for a single product in a hierarchical way
- large chunks of text went missing
- How to change popular term checklist title when edit post?
- Get Date of custom field and use conditional logic
- Save & Publish disabled for two dimensional array Customizer
- Deep customization of wp-login.php
- What requirements for ACF custom fields key and name properties?
- Custom CSS at Appearance > Edit CSS is missing after update [closed]
- How to store page visit counts?
- Load File (Function & Variable Value) from Child Theme
- Featured Image If Else Condition
- how to add custom logo to my template
- If the image variable is specified, show image, if not no code
- WordPress noob, assign custom stylesheet using @import or if? Didn’t work for me
- I want to print a message in post ” After one month from publish date”
- How to query details of images in gallery that is attached to a post
- Is there another way to customize a parent template file besides adding the file to a child theme?
- Replacing words in WordPress or theme (not in content)
- WordPress Child Theme Stylesheet being loaded before Parent’s minified .css
- How to create custom search page
- Where to store reusable content that is not a page
- WordPress broken after changing URL
- How to have multiple WordPress Menus
- How to make the Pages in WordPress Customized?
- Custom “wp_login.php?action=lostpassword” and reset password
- Custom theme – how to link the image without posting it
- Where to upload my new custom ShortCode in Separate .php file?
- wp_enqueue_script JS code runs too late (after user begins interacting)
- Get custom text if in Category
- Conditional Logic on CF7 dropdown options
- Change admin_title of a plugin using code snippet/functions
- Validate user login in php
- Can’t upload format files on media library
- Adding a custom field to a slug
- Query Product categories what have a custom field
- How to show Term ID beside Name Category with wp_dropdown_categories()
- How to create custom backend admin menu in different languages?
- WordPress Performance and bulk edits
- Make Widget appear on Dashboard
- Delete page titles
- Woocommerce dependent attributes
- Send email notification when post type product is publish from pending status
- WordPress Customizer: Check for value of CSS selector and replace it
- How to add custom Author Info Box to blog posts “only” and NOT custom post templates
- Bio comes up when the visitor clicks on a picture
- How to find and replace (or add) specific word in a specific category?
- Accountless password generation
- Creating a Treeview Listing of a Directory
- WooCommerce – Adding custom HTML to specific product pages
- How do I move my sites to a child theme without loosing customisation?
- Displaying all Custom fields on post except some
- How to create new page can get custom field other post in wordpress
- How to appoint different users to different pages?
- insert autofocus in a custom taxonomy form
- display my pages html
- Is there a way to hide a user’s posts from their Activity feed?
- customize footer widgets area
- Setting up staging area
- Accessing + retrieving custom database in WordPress
- updated permalink structure on localhost does not work
- Word Press Theme Customiser and Child theme Function.php
- Security Issues with custom user role or changing core role capabilities?
- adding new html css to wordpress section from codepen [closed]
- Do i need to use PHP in customizer api?
- Background image no more visible in the preview