Olá! Wednesday, 04 de October de 2023.



Dicas CódigoFonte.net
Tuesday, 03 de April de 2012

Como deixar apenas o resumo do post no WordPress?

Olá Pessoal, 

Essa dica é bem simples, mas para aqueles que estão aprendendo a mexer no Wordpress, principalmente criando temas, é bastante útil.

Como deixar apenas o resumo dos Posts na página inicial do meu blog? 

Simples, procure pela TAG no index.php ou home.php:

<?php the_content(); ?>

E troque por:

<?php the_excerpt(); ?>

Pronto. 


Comentários do artigo [Novo comentário]

francisco - 13 de December de 2013 - 18:38
ÓTIMAS DICAS OBRIGADO.
Professor Leandro Rocha - 24 de April de 2014 - 09:40
Bom dia Emmanuel,

O meu tema é o indicate e no index.php está assim:

<?php global $theme; get_header(); ?>

<div id="main">

<?php $theme->hook('main_before'); ?>

<div id="content">

<?php $theme->hook('content_before'); ?>

<?php
if (have_posts()) : while (have_posts()) : the_post();
/**
* The default post formatting from the post.php template file will be used.
* If you want to customize the post formatting for your homepage:
*
* - Create a new file: post-homepage.php
* - Copy/Paste the content of post.php to post-homepage.php
* - Edit and customize the post-homepage.php file for your needs.
*
* Learn more about the get_template_part() function: http://codex.wordpress.org/Function_Reference/get_template_part
*/

get_template_part('post', 'homepage');

endwhile;

else :
get_template_part('post', 'noresults');
endif;

get_template_part('navigation');
?>

<?php $theme->hook('content_after'); ?>

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

<?php get_sidebars(); ?>

<?php $theme->hook('main_after'); ?>

</div><!-- #main -->

<?php get_footer(); ?>

Aonde posso alterar para aparecer somente o resumo do post?

O meu site é http://professorleandrorocha.com

Desde já agradeço.

Professor Leandro Rocha
Rodolfo Teixeira - 25 de July de 2014 - 08:22
Obrigado. Funcionou perfeitamente.
Para adicionar um comentário você deve efetuar o login


Gostou do CódigoFonte.net? Quer indicar a um amigo?
Preencha os campos a seguir.
Seu Nome:
Seu E-mail:
E-mail de seu Amigo:


CodigoFonte.net » Meu Mural » Competiva - Criação de Sites » Todos os Direitos Reservados © 2002/2010