Add a css style or class
-
can someone help me add a class to this?
echo $curuser->display_name;
its working fine but i can’t change the styles of it!here’s my full loop if that helps:
<?php /** * The template for displaying Author Archive pages. */ get_header(); ?> <div id="main"> <div class="main-section"> <div class="headline"> <div class="holder"> <h1>Blog</h1> </div> </div> <div class="main-content"> <?php while ( have_posts() ) : the_post(); ?> <?php $author_id=$post->post_author; ?> <?php endwhile; ?> <?php $args=array( 'showposts' => 15, 'author' => $author_id, 'caller_get_posts'=>1 ); $posts=get_posts($args); if ($posts) { $curuser = get_userdata($author_id); $author_post_url=get_author_posts_url($curuser->ID, $curuser->nicename); echo "<h2>$curuser->display_name;</h2>" foreach($posts as $post) { setup_postdata($post); ?> <h3 class="category"><?php the_category();?> </h3> <div class="blogContainer"> <div class="blogpiece"> <div class="titleMeta"><div class="metaDeets">by <?php the_author_posts_link(); ?> | <?php the_time('g:i') ?> | <?php the_time('d/m/Y') ?></div><h6><?php the_title(); ?></h6></div> <div class="mainText"> <?php the_excerpt(); ?> </div> <div class="readMorebox"><a href="<?php echo get_permalink(); ?>">» Read more</a></div> </div> </div> <?php } // foreach($posts } // if ($posts ?> </div> </div></div> <?php get_footer();?>
Thanks ??
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Add a css style or class’ is closed to new replies.