Numbers next to Categories
-
Hi
I’m new here so bare with me, I’m using the Tulip theme skin and it doesn’t have numbers behind the categories. I tried using this
<?php wp_list_cats(‘sort_column=name&optioncount=1’); ?>and the categories looked like this:
Books
(6)
Comics
(3)
General
(64) and so on..I also tried changing the display: block; to fixed in the CSS style but it messed everything up, please can anyone help me in this problem? here is the template for my sidebar:
#left { float: left; width: 210px; padding: 20px 10px 20px 10px; border-right: 1px solid #ffe2f1; }
#left ul { margin-left: 0px; padding-left: 0px; font-weight: bold; }
#left ul li { margin-left: 0px; padding-left: 0px; margin-bottom: 20px; list-style-type: none; }
#left ul ul { border-top: 1px solid #ffe2f1; font-weight: normal; padding: 0px; margin: 0px; }
#left ul ul li { border: none; padding: 0px; margin: 0px; font-weight: normal; list-style-type: none; display: block; }
#left ul ul li a:link, #left ul ul li a:visited { display: block; padding: 2px 0px 2px 10px; margin: 0px; background-color: #ffb9df; color: #a2326f; border-bottom: 1px solid #ffe2f1; border-left: 1px solid #ffe2f1; border-right: 1px solid #ffe2f1; text-decoration: none; }
#left ul ul li a:hover { background-color: #ffe2f1; color: #be6897; border-bottom: 1px solid #ffb9df; border-left: 1px solid #ffb9df; border-right: 1px solid #ffb9df; border-top: #ffb9df; font-weight: bold; }
-
What do you mean by “behind”?
I guess the OP wants this
Books
(6)
Comics
(3)
General
(64)
to become something like
Books (6)
Comics (3)
General (64)yes that’s what i meant can you help?
How wide is your sidebar vs how many characters in your categories? Seems to me, it should be immediately after, unless your width is pushing the number below.
I’m not sure but this is my blog http://www.tempella.com/ if you want to check.
I’m having the same problem, and I have plenty of room in my sidebar.
I just tested this code, and it put the count directly in line with the cat
<?php wp_list_cats('optioncount=1'); ?>That doesn’t work for me. This is my code:
<?php wp_list_cats('sort_column=name&hierarchical=1&optioncount=1'); ?>I’ve seen this code as well:
<?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>But neither of them work. They look like Tempella’s first post.
Not sure what to say
http://sandbox.miklb.com/
You can see it works there.Perhaps one of the parameters is adding a
<br />The same link and I’ve added all three parameters.
Has to be a margin/padding issue
I did what you asked but got the same result as before. When i changed the display: block; to fixed it worked and the numbers were lined perfectly but it messed up the other side bar contents.
Perhaps you could create a div with the sidebar called cat or sidecat, etc, and simply set just that section to block, thereby not borking the rest of the sidebar.
What happens if you remove display: entirely? That’s what worked for me!
The topic ‘Numbers next to Categories’ is closed to new replies.