stakkit
Member
Posted 6 months ago #
I must give the class term-<?php the_ID(); ?> to wp_list_categories:
<ul>
<li class="all"><a href="#" class="all current" data-value="all"><?php _e('All', 'framework'); ?></a><span>/</span></li>
<?php
wp_list_categories(array(
'title_li' => '',
'taxonomy' =>
'skill-type',
'walker' => new Portfolio_Walker(),
'show_option_none' => ''
)
); ?>
</ul>
Is there anyone who can help me?
Thank you and sorry for my bad english!
your list seems to use a custom walker (a custom functions to build and show the list):
'walker' => new Portfolio_Walker(),
try to find this function Portfolio_Walker() possibly in functions.php of your theme (what theme are you using?)
then paste the full code of that function into a http://pastebin.com/ and post the link to it here (how to: http://codex.wordpress.org/Forum_Welcome#Posting_Code )
stakkit
Member
Posted 6 months ago #
thank you alchymyth!
here the link:
http://pastebin.com/fvMu9hwy
stakkit
Member
Posted 6 months ago #
when I click on view source code from the browser I see only <li> tag without the class.
can you indicate where the class has to be added in the menu:
<ul>
<li class="all"><a href="#" class="all current" data-value="all"><?php _e('All', 'framework'); ?></a><span>/</span></li>
....
is the class supposed to use the post ID or the category ID?
stakkit
Member
Posted 6 months ago #
I would like a menu as:
<ul>
<li class="all"><a href="">All</a><span>/</span></li>
<li class="term-1"><a href="" data-value="term-1">Red</a> <span>/</span></li>
<li class="term-2"><a href="" data-value="term-2">Blue</a> <span>/</span></li>
<li class="term-3"><a href="" data-value="term-3">Yellow</a> <span>/</span></li>
<li class="term-4" ><a href="" data-value="term-4">Green</a> <span>/</span>
</li>
</ul>
I think that should be something like '<li class="term-'.$category->term_id.'" '
stakkit
Member
Posted 6 months ago #
but I do not know how use it.
[please be more patient - do not bump]
stakkit
Member
Posted 6 months ago #
I solved my problem with: $output .= '<li class="term-'.$category->term_id.'" ';