In my blog (www.tecnobot.com), I have installed the AdSense Sharing Revenue and Earnings Plugins (http://adsense.ayanev.com/how-to-use-this-plugin/).
In this plugin, I specify a php function in the Google Adsense code, so the Adsense client code changes with the adsense client code of each author, inserted previously in the administration panel.
The first adsense advertisement includes this line of php code, in which, I presume, the variable is defined:
<?php $id=$post->post_author; $google_id = kd_get_google_id($id); echo
This outputs the adsense code of each author in his articles.
The plugin creator said that in the next advertisements or Google Adsense blocks, and in the sidebar I have to put this php code:
<?php echo $google_id; ?>
The problem is that since the first advertisement is located in the single.php and the second in the sidebar.php, the variable google_id is not carried and it does not output anything in the sidebar.
The author suggested to store the variable as a session variable. I presume that is for the variable to be carried along the blog in those pages.
How do I define that variable as a session variable or similar, so the variable outputs the two times?
Thank you very much in advance,