• I spent most of the day searching out this problem both on here and the codex. Problem is that I don’t know exactly what I’m looking for a almost zero php and css knowledge. My apologies if I’m just a little too dumb-witted to have found it.

    So, I have categories which have subcategories. The current theme has an appearance that makes the distinction a little difficult. So, I’m curious if there is an easy way to say bold the Parent without bolding the child, or, as the example given in the codex (with no explanation on how to do it) have the Child blue and the Parent Red. Something to that effect.

    Any ideas?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Are you talking about the sidebar links? you want the subcategory list to look a little different hat it’s parent? Or do you mean the whole post?

    Thread Starter oce

    (@josepo)

    Sorry, in the sidebar links.

    What theme are you using? Do you have a link to your site?

    Hey everyone

    I was about to post almost exactly the same question; I’ve only been using WordPress for a few days, but I’m working on my second custom theme for a client. I was also wondering if there’s a way to differentiate (with CSS) between a Parent page and a child. For example:

    Business Services
    Bookkeeping / Payroll
    Accounting / Tax Work
    Management Accounting

    …where ‘Business Services’ is the parent (and so is bold), and the links following that are subpages.

    Any help would be awesome, as I’m a total WP newbie.

    Okay, since no one is providing any code, or a link to a site so I can see what’s up – then I’ll do the best I can.

    The lists are created in the <ul><li>list item<ul><li>sublist item</li></ul></li></ul> format. Just style the parent as you will, then style the children as you will.

    ul {
    list-style:none;
    font-weight:bold;
    }
    
    li ul {
    list-style:disc;
    font-weight:normal;
    }

    Easiest way to find what you want to do is to view the source code that’s output from the site. Then you can see what you need to target.

    Thread Starter oce

    (@josepo)

    The stylesheet has this which seems relevant:

    #menu {padding:0; border:0px solid #000000 }
    #menu ul {list-style:none; margin:0; padding:0; font-size:85%;}
    #menu ul li { padding:0; margin:0; border-bottom: #ddd3af solid 2px; }
    #menu ul li a { display:block; padding:4px 4px 4px 10px; text-decoration:none;}`
    #menu ul li a:hover { color:#C60C30; background: #DDD3AF; }
    #menu ul li em { display:none; }
    #menu ul li.sect { font-weight:bold; color:#00ff00; background:#89d; padding:2px 0; text-indent:2px; margin-top:2px;}
    #menu ul li.first {margin-top:0; }

    li .categories, li .linkcat, li .pagenav {
    list-style: none;
    margin: 0px;
    padding: 10px;

    }

    Changing the Bolded section affects every item in the category section of the sidebar. This seems to me because it’s a link (as denoted by a)

    Problem is that I don’t know where to change the information just so that certain markup affects the children as opposed to parent.

    The web source follows:

    <ul>
    					<li><a href="https://xxx/?cat=3" title="View all posts filed under Commercials">Commercials</a>
    	<ul class='children'>
    	<li><a href="https://xxx/?cat=6" title="View all posts filed under Christmas Commercials">Christmas Commercials</a>
    </li>
    	<li><a href="https://xxx/?cat=7" title="View all posts filed under Patio Commercials">Patio Commercials</a>
    </li>
    	</ul>
    
    </li>
    	<li><a href="https://xxx/?cat=1" title="View all posts filed under How To">How To</a>
    	<ul class='children'>
    	<li><a href="https://xxx/?cat=4" title="View all posts filed under Christmas">Christmas</a>
    </li>
    	<li><a href="https://xxx/?cat=5" title="View all posts filed under Patio">Patio</a>
    </li>
    	</ul>
    </li>

    <ul class='children'>

    right there. “UL” will define the regular list. But ul class="children is a sub list. Just define the sublist stuff and you’re set.

    Thread Starter oce

    (@josepo)

    No where in the style sheet, nor the other pages is ther a “ul class=’children'” for me to edit the style of.

    And what is stopping you from adding it to your stylesheet?
    (WP is generating the children class for you – check your own code posted above – so just work on the stylesheet)

    I have a similiar problem too.

    My HTML shows:

    [moderated – don’t post long code here]

    I don’t seem to be able to get this to work.

    I want it to look like

    Family
    Baby
    Holiday
    Kids
    Pets
    At Home

    and so on

    Obviously CSS/HTML is not my strong point.

    Anyone takers?

    thanks
    Kym

    great without the code – no-one can help me.

    how come others got to post code longer than I had?

    thanks a million, moderator

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Subcategory Styles’ is closed to new replies.