Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php query_posts("showposts=1&category_name=Destaque"); ?>
- <?php if ( have_posts() ) : ?>
- <?php while (have_posts()) : the_post(); ?>
- <div id="destaque">
- <img src="<?php bloginfo('template_directory'); ?>/imagem/blocktop800.gif">
- <div class="title">Destaque</div>
- <div id="dback">
- <div id="dimg">
- <?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 5600,1000 ), false, '' ); ?>
- <img src="<?php echo $src[0]; ?>">
- </div>
- <div id="dcontent">
- <a class="dtitle" href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a><br>
- <span id="dtext">
- <?php
- // Get $post if you're inside a function
- global $post;
- if ( empty($post->post_excerpt) ) {
- echo substr(strip_tags(get_the_content()),0,200);
- } else {
- the_excerpt();
- }
- ?> <a href="<?php echo get_permalink(); ?>">Ler Mais ยป</a> </span>
- </div>
- <img src="<?php bloginfo('template_directory'); ?>/imagem/destaquebottom.gif">
- </div>
- </div>
- <?php endwhile; ?>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement