An argument can’t be a function, but it can be a variable. I’m not exactly sure what you’re trying to do, but if you can store the return value of one function as a variable, and then use that in your parameters.
I don’t know if this would be a solution for you or not, just based on the one line of code.
Well that’s not exactly true, an argument can be a function, but not the way you’re doing it.
Why do you have an extra <?php and ?>… does query_posts() step out of PHP?
I’ve many post with tags..
In sidebar, into archive page, I would insert this code:
<?php
query_posts(‘tag=iphone+video&showpost=10’);
?>
Works correctly…show only post with tags iphone and video..but if I would change “iphone” with current tags I’ve many problems…
Ex:
<?php
query_posts(‘tag=<?php single_tag_title(); ?> +video&showpost=10’);
?>
ok, so how do you place the variable in the function?
i have converted the argument into a variable:
<?php $current_tag = single_tag_title("", false); ?>
now
<?php single_tag_title(); ?>
is
$current_tag
am i right?
now how can i add that variable to this function (replacing the tag “coldplay” with “$current_tag”)
<?php
echo ' ';
if ( is_tag(coldplay) ) {
' » '; include(TEMPLATEPATH . '/articles/coldplay.php');
}
echo '
';
?>
how is the final code?
please help me thanks! i have been hours trying to solve it