• Resolved randinicole

    (@randinicole)


    Usually I am the one giving help ?? and after searching the net for this and a few other things in regards to categories all I turned up is a bunch of plugins that do not really do the trick. The first thing I was wondering (if it is even possible) is to align category name to left while the count aligns all the way to the right. Example below. This is also listed in a sidebar with set width so I am hoping it is duable.

    category           [10]
    categoryone        [10]
    categoryeightsix   [10]
    categorystwoone    [10]

    The second thing, I love how the post come up when you click the category link and go to the category page. But I was needing to add a banner (associated with said content in category) to the top of that category page. I have no idea if this is possible, altho I seen a few plugins, I messed with them and I just couldnt get it to work right so I was wondering if I could modify some files and get it to work right. Could I make templates, like category1.php and have all the post in that category show on the page and code in the banner, and just repeat, like category2.php and so on.

    Sorry if this is confusing. I would like to examples but it is a website that displays adult content so I would rather not link to it.

    ETA: I know I could have put this into templates and css but I feel it is more of a how to issue. IF it is wrong feel free to move it.

    I have read over https://codex.www.ads-software.com/Function_Reference/is_category but I am not sure how I would add this code with the clickable banner.

Viewing 1 replies (of 1 total)
  • First bit:

    div.all-categories-box li.cat-item a {position:relative;padding:0 40px 0 0;}

    Where div.all-categories-box is the div that surrounds your category links. This style says, drill down to the links in that box and give those links a padding of 40px to the right. (The post count in brackets comes after each link).

    Second bit: conditionals.
    https://codex.www.ads-software.com/Conditional_Tags

    if (is_category(‘100000002’)) {echo ‘<img whatever />’;}
    if (is_category(‘elephants’)) {echo ‘<img whatever />’;}

Viewing 1 replies (of 1 total)
  • The topic ‘Styling category output and category pages’ is closed to new replies.