Hmm, I’m so confused about the code in the theme (not my theme).
Do you know what I will have to do?
I want my news to be shown like the 2 news in the “Siste nyheter” section.
Link to the site
<div id="list-categories">
<h2 class="section-title"><?php _e( 'Siste nyheter', 'wpbx' ) ?></h2>
<?php
// Flag to indicate alternating columns
$catLeftCol = true;
$intCount = 0;
// Determine how many posts to show per category
$intPostCount = 5;
// Retrieve a list of selected categories
$categories = get_categories("orderby=ID&order=asc&hide_empty=1&hierarchial=0&include=$front_cat_list");
// Iterate over each category
foreach ($categories as $category)
{
// Retrieve a handful of posts for this category
query_posts("cat=" . $category->cat_ID . "&showposts=$intPostCount&orderby=date&order=DESC");
// Increment the debug counter
$intCount++;
?>
<!-- Loop: <?php echo $intCount; ?> -->
<?php
// Initialise the thumb display flag
$catFirstPost = true;
// Do we have any categories to display?
while (have_posts())
{
// Advance the post queue
the_post(); $do_not_duplicate = $post->ID;
// Is this the first post in the category?
if ($catFirstPost)
{
?>
<?php
// Check whether we need to create the "row wrapper"
if ($catLeftCol)
{
?>
<div class="entry-row clearfix">
<?php
}
?>
<div id="<?php echo $category->slug; ?>-list" class="entry-list">
<h3 class="entry-list-cat-title">
<a href="<?php echo get_category_link($category->cat_ID); ?>" title="More articles in <?php echo $category->name; ?>"><?php echo $category->name; ?> »</a>
</h3>
<div class="entry-list-thumb">
<a href="<?php the_permalink(); ?>" title="<?php printf(__( 'Read %s', 'wpbx' ), wp_specialchars(get_the_title(), 1)) ?>">
<?php
$entry_preview = get_post_custom_values("entry-preview");
if ( is_array($entry_preview) ) { ?>
<img class="entry-preview" src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo get_post_meta($post->ID, 'entry-preview',true) ?>&w=258&h=110&zc=1" alt="<?php the_title(); ?>" />
<?php } else { ?>
<img class="entry-preview" src="<?php bloginfo('template_directory'); ?>/images/image-blank-big.jpg" alt="<?php the_title(); ?>" />
<?php } ?>
</a>
</div>
<h4 class="entry-list-title"><a href="<?php the_permalink(); ?>" title="<?php printf(__( 'Read %s', 'wpbx' ), wp_specialchars(get_the_title(), 1)) ?>"><?php the_title(); ?></a></h4>
<div class="entry-list-content">
<?php the_content_limit(85, ''); ?>
</div>
<p class="more-link">More in <?php echo $category->name; ?>
<ul>
<?php
// First post display is complete
$catFirstPost = false;
the_post() == $do_not_duplicate;
} // if ($catFirstPost)
?>
<li class="clearfix">
<span class="entry-star"><img src="<?php bloginfo('template_directory'); ?>/images/bullet-star.png" alt="#" /></span>
<h4><a href="<?php the_permalink(); ?>" title="<?php printf(__( 'Read %s', 'wpbx' ), wp_specialchars(get_the_title(), 1)) ?>"><?php the_title(); ?></a></h4>
<div class="entry-meta">
<span class="entry-date"><?php unset($previousday); printf( __( '%1$s', 'wpbx' ), the_date( 'D, M j Y', '', '', false ) ) ?></span>
<span class="entry-meta-sep">|</span>
<span class="entry-comm"><?php comments_popup_link( __( 'No Comments', 'wpbx' ), __( '1 Comment', 'wpbx' ), __( '% Comments', 'wpbx' ) ) ?></span>
</div>
</li>
<?php
} // while (have_posts())
?>
</ul>
</div>
<?php
/*
If we've run out of posts to display, we need to close the "row"
*/
if (!$catLeftCol)
{
?>
</div><!-- .entry-row -->
<?php
}
// Toggle the alternator
$catLeftCol = !$catLeftCol;
} // end foreach category
// Account for odd number of posts
if (!$catLeftCol)
{
?>
</div><!-- .entry-row -->
<?php
}
?>
</div><!-- #list-categories -->