← WordPress

Não mostrar categoria

Lida 5512 vezes

Offline

Fernando Augusto 
Membro
Mensagens 922 Gostos 0
Feedback +1

Troféus totais: 30
Trófeus: (Ver todos)
Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3

Existe alguma maneira de associar posts a uma categoria e fazer com que esta não seja visivel (como se fosse uma lixeira num forum)?
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Podes mostrar o que tens para mostrar os posts no ficheiro index.php do theme?

Onde começa if ( have_posts() ) ou qualquer coisa parecida.
Offline

Fernando Augusto 
Membro
Mensagens 922 Gostos 0
Feedback +1

Troféus totais: 30
Trófeus: (Ver todos)
Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3

no index.php não tenho nada com "ligação" as categorias tenho no header.php

Código: [Seleccione]
<div id="topmenu">
   
<ul id="nav" class="grid_15">
<?php wp_list_categories('title_li=&exclude=' $GLOBALS[asides_id]) ?>
            <li>&nbsp;</li>
</ul>
             
</div>
    <!--/topmenu-->
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Não queres mostrar o link para uma categoria ou não incluir essa categoria ao mostrar os posts(todos os posts que estão na categoria x não são mostrados na homepage)?
Offline

Fernando Augusto 
Membro
Mensagens 922 Gostos 0
Feedback +1

Troféus totais: 30
Trófeus: (Ver todos)
Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3

De preferencia os dois, ou então o último (não incluir essa categoria ao mostrar os posts(todos os posts que estão na categoria x não são mostrados na homepage)
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Então pronto envia-me o que te tinha pedido antes.

ou então procura na index.php <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
E adiciona antes disso <?php query_posts('cat=-4'); ?>

(Muda a id da categoria.)
Offline

João Silva 
Membro
Mensagens 1185 Gostos 0
Feedback +6

Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

existem plugins para Ocultar as categorias..
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

existem plugins para Ocultar as categorias..

Isso não sei... :/
Offline

Fernando Augusto 
Membro
Mensagens 922 Gostos 0
Feedback +1

Troféus totais: 30
Trófeus: (Ver todos)
Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3

Funciona ORiOn, mas a categoria aparece no "Menu de navegação", sabes como posso fazer o mesmo para aí, não é muito importante
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

<?php wp_list_categories('title_li=&exclude=ID_DA_CATEGORIA' . $GLOBALS[asides_id]) ?>
Offline

Fernando Augusto 
Membro
Mensagens 922 Gostos 0
Feedback +1

Troféus totais: 30
Trófeus: (Ver todos)
Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3

Okay. Obrigado!
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Offline

Fernando Augusto 
Membro
Mensagens 922 Gostos 0
Feedback +1

Troféus totais: 30
Trófeus: (Ver todos)
Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3

Sim sim, desculpa, esqueci-me de dizer :D
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Sim sim, desculpa, esqueci-me de dizer :D

No problem! xD
Offline

bfms 
Equipa
Mensagens 1769 Gostos 40
Feedback +1

Troféus totais: 35
Trófeus: (Ver todos)
Search Level 6 Apple User Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes Poll Voter Poll Starter

Aqui tem uma solução mais fácil de implementar e tens controlo de tudo sobre essa categoria e afins:
http://wordpress.org/extend/plugins/advanced-category-excluder/

;)