← WordPress

Excerto de artigo na Homepage

Lida 1421 vezes

Offline

fmnj 
Membro
Mensagens 338 Gostos 1
Feedback +7

Troféus totais: 26
Trófeus: (Ver todos)
Level 5 Tenth year Anniversary Windows User Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2

Estou a usar o tema ZeeNews e este não tem opção de manter apenas um excerto do artigo na homepage, ele mostra tudo.

O que fiz foi instalar o Limit Post Add On e depois ir ao LOOP e substituir the_content()

Estava:
<?php the_content('<span class="moretext">' . __('Read more', 'themezee_lang') . '</span>'); ?>

Coloquei:
<?php the_content_limit(200, '<span class="moretext">' . __('Read more', 'themezee_lang') . '</span>'); ?>

No entanto fui de fim semana e quando regressei a homepage estava toda desformatada.
Tive que regredir para o código anterior, ficou OK, mas com os artigos listados na totalidade.
E voltei a fazer a alteração sugerida pelo plugin (adiciona o "limit 200") e ficou novamente como pretendo.

Mas temo que volte a acontecer o mesmo.


Para já vou manter como está, mas se voltar a acontecer o que aconselham?
Offline

Rogério Moreira 
Editor
Mensagens 1313 Gostos 11
Feedback +15

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter

Bastava usares  isto:

Offline

fmnj 
Membro
Mensagens 338 Gostos 1
Feedback +7

Troféus totais: 26
Trófeus: (Ver todos)
Level 5 Tenth year Anniversary Windows User Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2

Bolas... obrigado!

Muito mais simples assim.
Vou recolocar o código e passar a usar o separador.

Obrigado

Bastava usares  isto: