getting posts to float horizontal
-
Question…;
Why doesn’t this work? (works when used in html)
It’s suposed to put every news post next to eachother, just the image and the title with a max of 4 wide and continuous below if there are more posts.<div class="containerContent"> <ul class="columnContent"> <li> <div class="blockContent"> <?php the_post_thumbnail(); ?> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'your-theme'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> </div> </li> </ul> </div>
entire code;
<?php get_header(); ?> <div id="container"> <div id="content"> <div class="containerContent"> <ul class="columnContent"> <?php /* The Loop — with comments! */ ?> <?php while ( have_posts() ) : the_post() ?> <?php /* Create a div with a unique ID thanks to the_ID() and semantic classes with post_class() */ ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <li> <div class="blockContent"> <?php the_post_thumbnail(); ?> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'your-theme'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> </div> </li> <?php /* The entry content */ ?> <div class="entry-content"> <?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'your-theme' ) . '&after=</div>') ?> </div><!– .entry-content –> <?php /* Microformatted category and tag links along with a comments link */ ?> </div><!– #post-<?php the_ID(); ?> –> <?php /* Bottom post navigation */ ?> <?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?> <div id="nav-below" class="navigation"> <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">«</span> Older posts', 'your-theme' )) ?></div> <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">»</span>', 'your-theme' )) ?></div> </div><!– #nav-below –> <?php } ?> <?php endwhile; ?> </ul> </div> </div><!– #content –> </div><!– #container –> <?php get_sidebar(); ?> <?php get_footer(); ?>
this is what it’s supposed to do;
image
(don’t forget. when there’s a post 5 or 6, they should continuous below.)It shows the image & title (as i don’t want anything else) but all below eachother..
does anyone have a clue?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘getting posts to float horizontal’ is closed to new replies.