wp_title –> var
-
hi @ all,
i’m trying to get wp_title as a string in order to use it in a if statement, hence i want to display content only if the string has a certain value (page title). i put the following into the top level index.php:
<?php $var = wp_title('',false); // putting wp_title into string echo "$var"; // just a test - works, prints the title of the page if($var == "PAGE TITLE") // no more than a simple if statement... { echo "lorem ipsum"; // no output :( ?>
i’m not using any theme but inserted wp into an existing website.
any hints?
regards t567
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘wp_title –> var’ is closed to new replies.