ho un problemino
sul blog ho questo template: themebot.com/website-templates/wordpress-themes/4002-august
ho cercato "wp_list_categories" nei template, ma mi compare solo nel file archive.php e non in sidebar.php, dove invece è presente "wp_list_cats"
un pò disperato, e sperando di non chiedere troppo...
immaginatevi la situazione:
categoria id 1
subcat id 2
subcat id 3
categoria id 4
subcat id 5
subcat id 6 in pratica ho impostato categorie madri e figlie.
vi riporto qui di seguito i due template:
#################################
ARCHIVE.PHP
<?php get_header(); ?>
<div id="content" class="narrowcolumn">
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h2 class="pagetitle">Archive for the ?<?php single_cat_title(); ?>? Category</h2>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h2 class="pagetitle">Posts Tagged ?<?php single_tag_title(); ?>?</h2>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h2 class="pagetitle">Author Archive</h2>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h2 class="pagetitle">Blog Archives</h2>
<?php } ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="post-top">
<div class="post-title">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php if ( function_exists('the_title_attribute')) the_title_attribute(); else the_title(); ?>"><?php the_title(); ?></a></h2>
<h3>
Filed under <?php the_category(', ') ?> by <?php the_author() ?> on <?php the_time('d-m-Y') ?>
</h3>
</div>
</div>
<div class="entry clear">
<?php the_content('Read the rest of this entry »'); ?>
</div>
<div class="postmetadata">
<div class="alignleft">
<?php if ( function_exists('the_tags')) the_tags('<h3 class="tags">Tags : <span>', ', ', ' </span></h3>'); ?>
</div>
<div class="alignright"><?php comments_popup_link('No Comments', '<span>1</span> Comment', '<span>%</span> Comments'); ?></div>
</div>
</div>
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
</div>
<?php else : ?>
<h2 class="center">Not Found</h2>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
<?php endif; ?>
</div>
<?php get_footer(); ?>
#################################
SIDEBAR.PHP
<div id="sidebar">
<ul>
<?php /* Widgetized sidebar, if you have the plugin installed. */
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
<li><h2>Author</h2>
<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
</li>
-->
<li class="widget_categories">
<h2>Category</h2>
<ul>
<?php wp_list_cats('sort_column=name&optioncount=1'); ?>
</ul>
</li>
<li class="widget_archives"><h2>Archives</h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<? if ( function_exists('wp_tag_cloud')){ ?>
<li class="widget_archives">
<h2>tag cloud</h2>
<?php wp_tag_cloud('smallest=8&largest=22&number=50'); ?>
</li>
<? } ?>
<?php endif; ?>
</ul>
</div>
Mi sapreste esemplificare i cambiamenti che devo fare?
Le vs spiegazioni mi sono chiare, tuttavia si parla di una stringa in sidebar.php che invece mi ritrovo in archive.php e non so che fare...
E poi, una volta modificato il codice, dovrei togliere il widget category da admin, oppure si lascia... o si raddoppia
beh... grazissime per l'aiuto!!!
nicola