Hi,
I'd like to assing a variable to function ie.
$something = the_excerpt();
but everytime i do so, the_excerpt is automatically generated by wordpress ... how can i declare such variable without executing this function ?
Hi,
I'd like to assing a variable to function ie.
$something = the_excerpt();
but everytime i do so, the_excerpt is automatically generated by wordpress ... how can i declare such variable without executing this function ?
If in a 'standard post loop', try $post->post_excerpt.
It's proberly because..
the_excerpt();
Returns it's value...
Use..
get_the_excerpt()
Example..
$myvar = get_the_excerpt();
** Or perhaps Michael's suggestion.. **
;)
thank you all for your replies :)
This topic has been closed to new replies.