LAWYER BLOG – Problema com Últimas Notícias
-
Bom dia, amigos.
Instalei o Lawyer Blog e não estou conseguindo descobrir o comando para disponibilizar as últimas notícias (as que ficam em destaque).
Acredito que não haja bug, mas somente, inexperiência de minha parte, em não saber como adicionar o post à este local de destaque.Também gostaria de saber se há a possibilidade de programar para que as notícias fiquem automatizadas (passando entre as 4).
Segue o código fonte abaixo:
featured_box.php<?php global $am_option; ?> <?php query_posts('post_type=post&meta_key=_slider&meta_value=yes&showposts='.$am_option['main']['number_posts']); ?> <?php if (have_posts()) : ?> <div id="featured_box"> <a href="#" id="prev_slide"></a> <a href="#" id="next_slide"></a> <div class="top"></div> <div class="content"> <div id="slides"> <?php $i=0; while (have_posts()) : the_post(); $i++; ?> <div class="item"> <?php $thumbnail_id = get_post_thumbnail_id(); $thumbnail = wp_get_attachment_image_src($thumbnail_id,'full'); if(isset($thumbnail[0])) : $thumbnail = $thumbnail[0]; $thumbnail = am_image_resize($thumbnail, 314, 254); ?><div class="pic"><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><img src="<?php echo $thumbnail; ?>" alt="<?php the_title_attribute(); ?>" /></a></div><?php endif; ?> <div class="text<?php if(empty($thumbnail)) echo ' text_full'; ?>"> <h2><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <?php the_excerpt(); ?> <p><a class="btn_more" href="<?php the_permalink() ?>"><span>Read more</span></a></p> </div><!-- /text --> </div><!-- /item --> <?php endwhile; ?> </div><!-- /slides --> <div id="nav"></div> </div><!-- /content --> <div class="bot"></div> </div><!-- /featured_box --> <?php endif; wp_reset_query(); ?>Arquivo index.php (único local onde deve aparecer a janela):
<?php global $am_option; get_header(); ?> <div id="main_content"> <div class="col_page"> <?php if (have_posts()) : ?> <?php $count = 0; while (have_posts()) : the_post(); $count++; ?> <div class="post_item<?php if($count%2==0) echo ' post_item_last'; ?>" id="post-<?php the_ID(); ?>"> <div class="title"> <div class="title_top"></div> <div class="title_content"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <p class="posted"><?php the_time('j \d\e F \d\e Y') ?></p> </div> <div class="title_bot"></div> </div> <div class="entry"> <?php $thumbnail_id = get_post_thumbnail_id(); $thumbnail = wp_get_attachment_image_src($thumbnail_id,'full'); if(isset($thumbnail[0])) : $thumbnail = $thumbnail[0]; $thumbnail = am_image_resize($thumbnail, 98, 98); ?><div class="left_image"><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><img src="<?php echo $thumbnail; ?>" alt="<?php the_title_attribute(); ?>" width="98" height="98" /></a></div><?php endif; ?> <p><?php echo am_get_limited_string(get_the_excerpt(), 290, '...'); ?></p> </div><!-- /entry --> <div class="metadata"> <span class="by"><?php the_author() ?></span> <span class="comments"><?php comments_popup_link('0', '1', '%'); ?></span> <p><a class="btn_more" href="<?php the_permalink() ?>"><span>more</span></a></p> </div><!-- /metadata --> </div><!-- /post --> <?php if($count%2==0) echo '<div class="clear"></div>'; ?> <?php endwhile; ?> <?php $next_page = get_next_posts_link(__('Previous', 'am')); $prev_pages = get_previous_posts_link(__('Next', 'am')); if(!empty($next_page) || !empty($prev_pages)) : ?> <div class="pagination"> <?php if(!function_exists('wp_pagenavi')) : ?> <div class="al"><?php echo $next_page; ?></div> <div class="ar"><?php echo $prev_pages; ?></div> <?php else : wp_pagenavi(); endif; ?> </div><!-- /pagination --> <?php endif; ?> <?php else : ?> <div class="nopost"> <p><?php _e('Sorry, but you are looking for something that isn\'t here.', 'am') ?></p> </div><!-- /nopost --> <?php endif; ?> </div><!-- /col_left --> </div><!-- /main_content --> <?php get_sidebar(); ?> <?php get_footer(); ?>Desde já, obrigado.
Visualizando 5 respostas - 1 até 5 (de um total de 5)
Visualizando 5 respostas - 1 até 5 (de um total de 5)
O tópico ‘LAWYER BLOG – Problema com Últimas Notícias’ está fechado para novas respostas.