sams
February 20th, 2006, 08:38
I am trying to create a less blog like look to my site. I have found a few articles such as this (http://ifelse.co.uk/archives/2005/04/08/query_posts-redux/) and this (http://ifelse.co.uk/archives/2005/03/31/query_posts/)
I have just found the that the_title() accepts three params (http://codex.wordpress.org/index.php?title=Template_Tags/the_title&redirect=no), great. A before and after, and a boolean option to return or echo the result. However comparetive functions the_exceprt() the_meta() etc (hence the title of this post 'the_*') don't accept these params.
In order to what I plan I would like to return the values of each of the functions within the loop.
for example
$ex = the_excerpt("", "", false);
$dt = the_date("<span class=\"newsItemDate\">", "</span>", false);
$tt = the_title("<span class=\"newsTitle\">", "</span>", false);
// the mix it together
$newsItem = str_replace("<p>", "<p>" . $tt . "<br />" . $dt, $ex);
// further loop process
....
Is there a way to do this?
I have just found the that the_title() accepts three params (http://codex.wordpress.org/index.php?title=Template_Tags/the_title&redirect=no), great. A before and after, and a boolean option to return or echo the result. However comparetive functions the_exceprt() the_meta() etc (hence the title of this post 'the_*') don't accept these params.
In order to what I plan I would like to return the values of each of the functions within the loop.
for example
$ex = the_excerpt("", "", false);
$dt = the_date("<span class=\"newsItemDate\">", "</span>", false);
$tt = the_title("<span class=\"newsTitle\">", "</span>", false);
// the mix it together
$newsItem = str_replace("<p>", "<p>" . $tt . "<br />" . $dt, $ex);
// further loop process
....
Is there a way to do this?