It’s probably better to add your session_start(); to the top of your header.php file if you’re planning to use it in your theme.
If you are wanting to use a session in the admin, I’d recommend either passing variables through $_GET or $_POST. Also, if you need long term storage of variables, it’s pretty easy to store things in the options table. See the Settings API
Related Posts:
- Add multiple custom fields to the general settings page
- Display random categories on the front page (Finding and Editing Theme Functions)
- Is it possible to remove the “standard” post format?
- How to remove row-actions from pages table?
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- Modify search function in WordPress (TwentyTwelve)
- How to customize search result page title?
- How to fix a theme with page.php Default Template that accidentally deleted?
- Removing Unnecessary Text from Admin Menu without CSS
- Set default options for inserting media
- Default or Preset Content for Custom Post Types
- Remove tag on my RSS Feed
- Display WordPress Search
- Problem with extract() with custom shortcode
- How to add a rel attribute to images that contains their categories?
- add sidebar area to header of child theme
- Preferred Use of home_url()?
- Custom function for user register in wp?
- Creating loop within functions.php
- Delete pages and Create default pages for all new network sites
- Actions according to image type and size
- Post thumbnail relative link and HTML modify
- Refactor create_function
- adding custom classes for tables
- Pass Shortcode Attribute to footer Script
- How would go about if I just want a temporary function?
- Remove the deleted users avatar from list
- How to call custom function from functions.php in site-wide template files?
- Customizer field value into functions.php variable
- wp_dropdown_categories and custom attribute
- str_replace function in theme
- Automatically wrap multiple images in div
- Ajax not working properly
- is_customize_preview() like function to check if Customizer “Live Preview” in JavaScript
- Right way to update widget on dynamic new input field
- How to customly read JWPlayer’s “Playlist” items by using its “playlistid”?
- Include default functions and methods
- Hard-coding custom menu elements for menu manager
- Twentyten Child Theme: header images display messed up in admin panel
- How can I modify all existing tags while keeping the urls themselves?
- IF Statement on Button to make it complete and “uncomplete” based on user action / click
- Gravity Forms Button Text
- Find resources dynamically loading and change or add to the url
- When sale price is 0.00 show only regular price
- Unable to login using username
- Word Press – Dynamic Content [closed]
- Insert image in WordPress with HTML5 tag and caption function
- how can I just add to parent theme function(s) instead of redeclaring whole the function
- Move Custom Fields on General Settings Page to New Location
- Skeleton Child Theme Add Icon Bar to Header Flex Grid
- Custom HTML markup
- Use a shortcode to display custom meta box contents
- Create custom function for hero image
- How to append classname to body tag if guest user
- Where do I go to edit this area? [closed]
- Add attribute only to first image of every post via functions.php
- The_content and Preg_replace in loaded Iframe [closed]
- two search forms on the same page
- Function to replace comment’s accented characters before posting
- Insert a field with PREG_REPLACE – strange behaviour
- New checkbox in custom widget isn’t saving data
- Linking Javascript in functions.php file
- how to display a page before the home page
- Function to check if custom page is used by page?
- How to replace ACTION url from original wordpress login form?
- Header menu aligned right on all pages except for single-post page [closed]
- Save_post – Warning: Cannot modify header information
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- Modifying a WordPress Plugin
- CF7 select value get to function and reciept value from function
- Hide author info in single posts by certain users
- External api call and make global variable for any page visitor enters , page-home, page, single etc
- CSS style and app.js not loading
- Parent category as WOOCommerce Categories widget title
- Shortcode to insert default text and change one word throughout it?
- I want to customize the_posts_navigation function by replacing prev and next with images
- How would I correctly implement a new if statement in a child functions file?
- Woocommerce custom calculation function
- Remove all video attachment, both files and post/postmeta from database?
- True email confirmation for registration (keeping unvalidated users from user table)
- Adding A New Widget to WordPress Disables the Existing Widgets
- How To Show Shortcodes In WordPress Custom Fields?
- How to make an If Else on Excerpt Filter
- How do I integrate my Child Theme into a Custom Template?
- Shortcode to eliminate and replace with
- custom post with loading script per single post
- Get Value of Custom Field
- restrict access to specific urls on a specific period of time
- child_of not working while searching
- How to request login for user but not for bots
- functions.php / replacing div’s with new ones?
- Removing Facebook contact field from user contact not working
- How do I add functionality to images?
- Problem with removing characters “<” – WpAllImport
- How to create a post without link in wordpress?
- How to crop image in WordPress with aspect ratio for any size of image
- multible shortcodes (for differnt values) with one function
- Customizer cuistom CSS Priority ordre Issue
- Copy and Modified WooCommerce function is_coupon_valid [closed]
- Advanced Custom Fields in WP_Query: Clickable Text in List Format