• Resolved thinkofmedia

    (@thinkofmedia)


    I need to get the posts on beautyidentified.com to become side by side. But the post class function doesn’t add to the css.

    Please can someone assist.

    <div class="post wrap">
    
    				<?php
                        // Split the main content pages from the options, and put in an array
                        $featpages = get_option('woo_main_pages');
                        $featarr=split(",",$featpages);
                        $featarr = array_diff($featarr, array(""));
                        $col = 1;
                    ?>
    				<?php foreach ( $featarr as $featitem ) { ?>
                    <?php query_posts('page_id=' . $featitem); ?>
    
                    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>	
    
                    	<<?php if ($col == 1) echo "<div class=\"row\">"; ?>
    <div id="post col<?php echo $col;?>" id="post-<?php the_ID();<?php post_class(); ?>">
    <h2 class="post"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    					<?php if ( get_post_meta($post->ID, 'image', true) ) { ?>
                        <img src="<?php echo get_post_meta($post->ID, "image", $single = true); ?>" alt="" class="home-icon" />
    					<?php } ?> 
    
                       <div <?php if ( get_post_meta($post->ID, 'image', true) ) { ?>class="feature"<?php } ?>>
    
                           <?php the_excerpt(); ?>
                           <a href="<?php the_permalink() ?>">Read more</a></p>
                        </div>
                        <div class="hr"></div>
           				 </div>
           				 </div>
    				<?php if ($col == 1) echo "</div>"; (($col==1) ? $col=2 : $col=1); endwhile; ?>
                    <?php endwhile; endif; ?>
                    <?php } ?>

Viewing 1 replies (of 1 total)
  • You have a syntax error..

    <?php the_ID();<?php post_class(); ?>

    Should be ..

    <?php the_ID(); ?><?php post_class(); ?>

    or

    <?php the_ID(); post_class(); ?>

Viewing 1 replies (of 1 total)

The topic ‘Post Class not displaying’ is closed to new replies.