Trying this in my functions file. There is actually a lot more to this function than I am showing, but this is the important part that is messed up.
function xyz_loop() {
$defaults = array (
'before' => 'article id="post-' .get_the_ID(). '"' .post_class('clearfix'). 'role="main">',
'after' => '/article>',
);
$args = wp_parse_args( $args, $defaults );
extract( $args, EXTR_SKIP );
echo $before;
echo 'doing stuff here';
echo $after;}
the problem is the post_class is outputting the post classes before the article container instead of inside it.
Can I not use post_class like this?
wp_pars_argsfunction should throw an error. – kaiser Jul 26 '12 at 20:01