Aside Format
-
Dear All,
I am a new user desperately in need, can someone help me edit this code to allow aside formats to be active.
I have already added the “aside” format in functions.php and the option of aside format is available. opening my loop-entry.php, the code below is what i have but do not know how to edit it to display “aside” format and image.
<?php global $data; $count=0; while (have_posts()) : the_post(); $count++; ?> <?php /*-----------------------------------------------------------------------------------*/ // Posts Entry - used in the blog page & archives /*-----------------------------------------------------------------------------------*/ $margin = ''; if($count == '2') $margin = 'remove-margin'; ?> <article id="post-<?php the_ID(); ?>" <?php post_class('loop-entry boxframe '. $margin .''); ?>> <?php //get image height value if($data['entry_thumbnail_height']) { $entry_thumbnail_height = $data['entry_thumbnail_height']; } else { $entry_thumbnail_height = '200'; } //featured image $thumb = get_post_thumbnail_id(); $img_url = wp_get_attachment_url($thumb,'full'); //get full URL to image $featured_image = aq_resize( $img_url, 303, $entry_thumbnail_height, true ); //resize & crop the image //show featured image if it exists if($featured_image) { ?> <div class="loop-entry-thumbnail"> <a>" title="<?php the_title(); ?>"> <img src="<?php echo $featured_image; ?>" alt="<?php echo the_title(); ?>" /> </a> </div> <!-- /loop-entry-thumbnail --> <?php } ?> <div class="loop-entry-details"> <h2><a>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php echo wp_trim_words( get_the_content(), 25, '...' ); ?><a>" class="read-more"><?php _e('read more','fitnessmag'); ?> →</a> <section class="loop-entry-meta"> <?php echo get_the_date(); ?> - <?php comments_popup_link( __( '0 Comments', 'fitnessmag' ), __( '1 Comment', 'fitnessmag' ), __( '% Comments', 'fitnessmag' ) ) ?> </section><!--/post-meta --> </div> <!-- /loop-entry-details --> </article><!-- /entry --> <?php if($count == '2') { echo '<div class="clear"></div>'; $count=0; } endwhile; ?>
[Please use the code buttons when posting code – as is, your code may have been corrupted]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Aside Format’ is closed to new replies.