• So I have searched and I haven’t found nothing yet, but I think it may be useful for many people..the function <?php the_category('|'); ?> only allows template customization for the separators, but I want certain linked category names associated with the post, to have different styles than others on the same list (may be ordered or not.
    See here: http://www.re-searcher.com/site/content/illustrators (please Nevermind the cluttering, it’s not close to be finished)

    I want to achieve this because my site has artists whose artwork should be divided and easily styled or ordered in different groups of categories(to say 4 different groups of clickable childs only) right bellow the contents of his Bio page / Blog post, but also excluding generic categories like “featured” or “portfolio”

    So my problem is that I couldn’t find yet a plugin or a hack that can be able to add a custom order or style. in the_category function…

    I’m not good at php, but my clue goes to the core code of WP (I’m not sure which file) that outputs the following html code:
    <a rel="category tag" title="View all posts in CategoryX" href="http://www.website.com/blog/category/CategoryX">CategoryX</a>

    Changing to this on the front-end html(notice the caps):

    <a rel="category tag" CLASS="CATEGORYID" title="View all posts in Category-X" href="http://www.website.com/blog/category/category-x">Category x</a>

    Given This possible, I could then style my category on my css based on its ID or class??

    I know I can do this on the sidebar, but how is it possible inside the loop or the single post?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter kodap

    (@kodap)

    anyone?
    Basically now I just want to find where I can change the code to output this html inside the tag <a CLASS="categoryID" href="...blog/category" rel="category" >… of the listed category within the loop…

    I’m actually searching for the same resolution as you. I’ve separated the categories in my menu with different colors and I want the same colors on selected category in my posts aswell.

    http://www.geekofthestreet.com/

    Can someone please help us? 🙂

    Thread Starter kodap

    (@kodap)

    I am sill looking for a solution for this, must not be so hard… sorry for the bumping, but I’m kinda desperate to clean and organize my listing of categories in each looped post.. Thanks.

    Thread Starter kodap

    (@kodap)

    So Far, and thanks to this topic: http://wordpress.org/support/topic/237653?replies=13 , it has helped me a lot, but just half-progress to what I want to achieve:
    (excuse my lack of php skills, I can only understand to integrate the portions of code)

    I have followed and applied these add-ons to my category-template.php as seen here: http://trac.wordpress.org/attachment/ticket/7251/subcat-separator.diff

    but I have more than one assigned parent and further childs on each post: see image here: http://kodap.com/the_category.png (parent names in brown, childs in black) and I managed to add a class to style them; the above blue links are tags

    all I want is that the parent categories don’t repeat themselves, alowing all corresponding childs to be nested / inherited:

    Parent1>> Child1.1, Child1.2, child1.3,
    Parent2>> Child2.1, Child2.2…

    Am I missing something? do I have to hack the php so it doesn’t make the parents repeat? unorder alphabetically? – where?

    The alphabetical order of the childs is causing the parents to repeat themselves.

    btw. I’m using WP 2.6

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Styling Category names and category links inside the loop and single post’ is closed to new replies.