1

after hours to read docs about Wordpress I don't find how to get a code everywhere in my page (thew module, snippet or other).

In functions.php

<?php 
function foo_global() {
global $var;
$var = "foo";
}

add_action( 'wp_head', 'foo_global' );

I want to access in different par of my page to $var (especially blocks).

I try thru xyz PHP Code module ou Code Snippets module, but that display nothing.

I don't understand where I'm wrong so anyhelp is welcome.

Richard P.
  • 23
  • 6

0 Answers0