[Theame: First]: Costum post template (IF no thumbnail)
-
I created a costum post template.
I want to set Post text 100% width if there is no thumbnail?Any sugestions?
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1> <?php first_header_meta(); ?> <div class="hiden1" style="width:30%;padding:0 10pt 0 0;float:left;"> <?php if ( has_post_thumbnail() ): ?> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a> </div> <?php endif; ?> </div> </header><!-- .entry-header --> <div class="hiden"style="width:60%;float:right;padding:0 10pt 0 0;"> <?php if ( ! get_post_format() && ( 'summary' == get_theme_mod( 'first_content' ) || is_search() ) ) : ?> <div class="entry-summary"> <?php the_excerpt(); ?> <a href="<?php the_permalink(); ?>" rel="bookmark"><?php _e( '<span class="continue-reading">Lasīt pētījumu →</span>', 'first' ); ?></a> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php the_content( __( '<span class="continue-reading">Lasīt pētījumu →</span>', 'first' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'first' ), 'after' => '</div>', 'pagelink' => '<span class="page-numbers">%</span>', ) ); ?> </div><!-- .entry-content --> </div> <?php endif; ?> </article><!-- #post-## -->
- The topic ‘[Theame: First]: Costum post template (IF no thumbnail)’ is closed to new replies.