← WordPress

Artigo em destaque no Index

Lida 2109 vezes

Offline

Fernando Augusto 
Membro
Mensagens 922 Gostos 0
Feedback +1

Troféus totais: 30
Trófeus: (Ver todos)
Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3

O index do tema mostra os artigos em duas colunas, o meu problema é que quero colocar o último artigo em "destaque" ocupando o espaço todo do "content", sendo que os restantes artigos são mostrados nas tais colunas.

O tema é o http://wpthemes.templatepanic.com/?themedemo=Lasting.

Código: (php) [Seleccione]
<?php get_header(); ?>


<!-- BEGIN PAGE -->
<div id="page">
    <div id="page-inner" class="clearfix">
   
<div id="content">

<?php if (get_option('eted_activate_featured_gallery' ) =='true' ) {include(TEMPLATEPATH '/includes/slider.php'); } ?>

<div class="contentmain clearboth">
<?php if(have_posts()) : ?><?php while(have_posts())  : the_post(); ?>

<div id="destaque" class="clearfix">

<div class="imagedestaque">
<?php if(has_post_thumbnail()) : ?>
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail'destaque-image' ); ?>
</a>
</div>

<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>

<div class="categoriadestaque"><?php include (TEMPLATEPATH '/includes/postmeta.php'); ?></div>

<div class="infodestaque"><?php the_excerpt(); ?></div>

</div>
<div id="post-<?php the_ID(); ?>" class="posthome clearfix">

<?php if(has_post_thumbnail()) : ?>

<div class="thumbnail">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail'gallery-image' ); ?>
</a>
</div>

<div class="post-content">
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php include (TEMPLATEPATH '/includes/postmeta.php'); ?>
<div class="entry"><?php the_excerpt(); ?></div>
</div>

<?php else : ?>

<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php include (TEMPLATEPATH '/includes/postmeta.php'); ?>
<div class="entry"><?php the_excerpt(); ?></div>

<?php endif; ?>


</div> <!-- end div #post -->
<?php endwhile; ?>
<?php else : ?>
<div class="post">
<h3><?php _e('404 Error&#38;#58; Not Found'); ?></h3>
</div>
<?php endif; ?>
</div> <!-- end div .contentmain -->

<?php include (TEMPLATEPATH '/includes/pagenav.php'); ?>

</div> <!-- end div #content -->

<?php get_sidebar(); ?>


<?php get_footer(); ?>

Sendo que a div "destaque" é onde quero que o ultimo artigo criado apareça, ocupando o espaço todo do content.

Só que eu ao adicionar, dá-me erro na linha 57

Código: (php) [Seleccione]
<!-- end div #post -->
<?php endwhile; ?>
Offline

Fernando Augusto 
Membro
Mensagens 922 Gostos 0
Feedback +1

Troféus totais: 30
Trófeus: (Ver todos)
Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3

Bump
Offline

Fernando Augusto 
Membro
Mensagens 922 Gostos 0
Feedback +1

Troféus totais: 30
Trófeus: (Ver todos)
Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3

Bumpzito :)

Alguém pode dar-me uma ajuda aqui?
Offline

Fernando Augusto 
Membro
Mensagens 922 Gostos 0
Feedback +1

Troféus totais: 30
Trófeus: (Ver todos)
Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3

Bump :)