Home › Forum › Problemi Vari con WP › Non mostrare post in homepage…
-
AutorePost
-
-
7 Novembre 2008 alle 15:52 #8448elia866Partecipante
E’ possibile aggiungere un post al blog rendendolo visibile solo nell’archivio della categoria senza “farlo passare” dalla homepage ?
Grazie
-
7 Novembre 2008 alle 16:00 #59233wollyAmministratore del forum
crei una categoria ad hoc e poi modifichi il tuo loop cosଠ:
<!--here i exclude the category hidden-->
<?php if (in_category('2006')) continue; ?>
<!--end here i exclude the category hidden-->
2006 è l’id della categoria hidden del mio blg tu devi metterci l’id della tua categoria
-
7 Novembre 2008 alle 16:01 #59234wollyAmministratore del forum
naturalmenti devi anche chiuder il ciclo if alla fine del loop
<?php endif; ?>
-
8 Novembre 2008 alle 2:41 #59239elia866Partecipante
Ho modificato il file header.php inserendo
<?php if (in_category(‘—-‘)) continue; ?>
<?php endif; ?>
Ma purtroppo non funziona….soluzioni ?
Grazie mille
-
8 Novembre 2008 alle 5:36 #59240wollyAmministratore del forum
ma hai il loop nell’header.php?
-
8 Novembre 2008 alle 9:58 #59241elia866Partecipante
Penso proprio di si !
Questo è il mio head:
<head profile="http://gmpg.org/xfn/11">
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4125256-42");
pageTracker._trackPageview();
</script>
<meta name="description" content="<?php bloginfo('description'); ?>" >
<meta name="verify-v1" content="lB/1+S8EMoVI15iKJEkfoR1axwkT6aijC/25oKwiOk0=" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php if (function_exists('seo_title_tag')) { seo_title_tag(); } else { bloginfo('name'); wp_title();} ?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_head(); ?>
</head>
-
8 Novembre 2008 alle 10:22 #59242elia866Partecipante
Ci sono riuscito inserendo questo codice prima del loop in Index.php
Comunque sia grazie per l’aiuto !
<?php $page = (get_query_var(‘paged’))
? get_query_var(‘paged’) : 1;
query_posts(“cat=-46&showposts=10&paged=$page”);
?>
-
8 Novembre 2008 alle 10:25 #59243wollyAmministratore del forum
mi sembrava strano che il loop fosse in header.php
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.