Trouble styling post title differently in archive versus single view
-
I have a test site running here
On this archive page, I would like to make the size of the_title() smaller than on the single view page.
I tried changing the class names in the entry header portion of the content-archive file: eg. entry-title to “entry-archive”, but my style sheet doesn’t recognize the new classes. What am I doing wrong?
original code below
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if ( is_sticky() && is_home() && ! is_paged() ) : ?> <div class="featured-post"> <?php _e( 'Featured post', 'twentytwelve' ); ?> </div> <?php endif; ?> <div class="entry-header"> <!-- <?php the_post_thumbnail(); ?> --> <?php if ( is_single() ) : ?> <h1 class="entry-title"> <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"> <?php the_title(); ?> </a> </h1> <?php else : ?> <h1 class="entry-title"> <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a> </h1> <?php endif; is_single() ?> </div> <?php if ( is_search() ) : // Only display Excerpts for Search ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div> <?php else : ?> </article>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Trouble styling post title differently in archive versus single view’ is closed to new replies.