shortcode return string problems
-
i have a simple shortcode that i want to return a permalink with some h2 tags around it. below you can see my two samples the first one just returns a string with and the other gets the permalink with <h2>’s around it. I put the <h2>’s around the test case to make sure they werent getting filtered out. any suggestions?
function demolistposts_handler() {
$retVal = ‘<h2>hello earthlings</h2>;
return $retVal;
}this returns what i would expect but the following returns
the link with no tags
function demolistposts_handler() {
$temp_link = the_permalink();
$retVal = ‘<h2>$temp_link</h2>;
return $retVal;
}
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘shortcode return string problems’ is closed to new replies.