how to put Post title in a variable and call in Sidebar?
-
Folks,
I want to put the current post’s title in a variable and i want to call this variable in the sidebar.
I tries using:
$post_title_test = post_title();
but it does not work.
Another thing, if i define a variable in Single.php, to call this variabel in Sidebar, do i have to define it as Gobal variable like:
global $post_title_test;
If not then How?
Thanks all
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘how to put Post title in a variable and call in Sidebar?’ is closed to new replies.