View difference between Paste ID: txv3W6Cu and 57yWSjks
SHOW: | | - or go back to the newest paste.
1
	<?php query_posts("showposts=1&category_name=Destaque"); ?>
2-
	<?php if ( has_posts() ) : ?>
2+
	<?php if ( have_posts() ) : ?>
3
	<?php while (have_posts()) : the_post(); ?>
4
5
<div id="destaque">
6
	<img src="<?php bloginfo('template_directory'); ?>/imagem/blocktop800.gif">
7
	<div class="title">Destaque</div>
8
9
		<div id="dback">
10
11
			<div id="dimg">
12
13
	<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 5600,1000 ), false, '' ); ?>	
14
15
	<img src="<?php echo $src[0]; ?>">
16
17
			</div>
18
19
			<div id="dcontent">
20
21
		<a class="dtitle" href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a><br>
22
 		<span id="dtext">
23
24
25
<?php
26
// Get $post if you're inside a function
27
global $post;
28
29
if ( empty($post->post_excerpt) ) {
30
    echo substr(strip_tags(get_the_content()),0,200);
31
} else {
32
    the_excerpt();
33
}
34
?> <a href="<?php echo get_permalink(); ?>">Ler Mais »</a> </span>
35
36
			</div>
37
38
	<img src="<?php bloginfo('template_directory'); ?>/imagem/destaquebottom.gif">
39
40
		</div>
41
42
</div>
43
44
	<?php endwhile; ?>
45
	<?php endif; ?>