PHP Session Variable to WordPress Error

You need to add your code to the functions.php file of your theme. (Actually, adding it to your Child Theme is best, since you don’t want a theme update changing things. Unless you are writing your own theme.) So this in your functions.php file: if(!session_id()) { session_start(); }

how to remember specific action/event for current user?

According to the documentation there are 3 Polylang functions that can help you here : The first to “remember” the user language. pll_current_language // Returns the current language pll_current_language( $value ); // ‘$value’ => (optional) either ‘name’ or ‘locale’ or ‘slug’, defaults to ‘slug’ returns either the full name, or the WordPress locale (just as … Read more

ajax polling with admin-ajax.php

You idea is equivalent to DDOSing your site, and the difference between the methods is only how fast you will bring the site down. WordPress AJAX handling is expensive, and should be limited to user initiated actions. Your second method will be more resilient but you are still going to be wasting server resources as … Read more

Pass WordPress variable to the next page

If it is working with a literal string (“example”) but not with the variable, we can assume that the issue is with your variable. You haven’t provided all of the code for that section of index.php, but as it is I do not think you can expect that variable to hold anything. First, you are … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)