![]() |
Wordpress, php, and css question (help me please)
Hello. Im trying to style the wp_list_categories tag (<?php
wp_list_categories('arg'); ?>). i know that i can style it using an unordered list and css. Something like this: <ul class="cat_list"><?php wp_list_categories('show_count=1&hide_empty=1&titl e_li=<h2>Categories</ h2>'); ?></ul> That will print a list of categories, hide categories with zero post, and show title called "categories". What i would like to do though is make the parent category links look different from the child category links (have a different font size or use <h3> tag for parent category), so i how would i do that? Like i said I know how to style whole list but how can I make this customization happen? Or is it not possible? Thanks for any help. :) |
bumperoo
|
bump for ya
|
well, I don't have an example with categories and subcategories at hand (oh my, why in hell every single person asking for help NEVER includes the example so they can actually be helped?) but if you constructed it using defaults you should have something like
Code:
<ul> Code:
<li> Cat 2 Children category </li> |
Quote:
sorry i was tired when i made thread...the wp_list_categories prints your category list heres a snippet of code from the default wordpress theme sidebar: Code:
<?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?> http://www.hotmovies.com/categories.php The parent cats are bold and using the <h3> tag, therefore helping to show the difference between parent and child cats. Is that possible in wordpress? |
bump for me :)
|
Code:
$sql = "SELECT name,slug,$wpdb->terms.term_id as ID,parent FROM $wpdb->terms ". Code:
WHERE parent=5 |
Quote:
have a look at the default wordpress css styling, theirs one for child cats. http://digwp.com/2010/05/default-wor...-styles-hooks/ |
Quote:
Figured this would get the job done without telling him what CSS styles he needed to change ;) |
Quote:
|
this may require custom solution it seems...
|
Quote:
Code:
<?php $sub_cat = wp_list_categories('echo=0&orderby=name&title_li=&hierarchical=0&child_of='.$category->cat_ID); ?> |
hit me up on icq 704-299 ill see if i can sort you out
|
Watch out... I ICQ'd Fris once and all the sudden my dog died.
ICQ at your own risk... |
All times are GMT -7. The time now is 11:05 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123