• Hi,

    Im loving WordPress 1.5, but Im getting frustrated trying to implement my theme design as I want to style more elements with background images and so forth such as the comment and post links.

    There seeme to be no set classes for these elements. For example ,with comments_popup_link you cannot style for different comment states; “No Comments” “# Comments” “Comments Off”-although you can set one overall class or insert images although this is not preferred.

    What is the best way around this?

    • A)Hardcode the classes into the anchor tags in the core code?
    • B)Find a bunch of plugins to do it?
    • C)Re-create the function(s) in my-hacks.php with set CSS classes?

    Your advice GREATLY appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Are you designing this for public release? That’s a different issue. If you are designing this for yourself, then slap in your own classes to whatever you want any where you want. Don’t make it too complicated, just do whatever you want.

    If you are designing this for public release, then really look carefully at the defaults and you may find the classes or IDs are there, but you just have to really hunt. You can also use the example in Kubrick’s default theme for handling comments and insert your own classes for each case.

    Thread Starter richardlee

    (@richardlee)

    Hi Lorelle ??

    OK, well I am designing for myself, however I would like to make my site as easy to update as possible. My initial idea of nesting img tags for icons is annoying as setting them individually, and ultimately updating is time consuming. I would like to seperate content from code if you know what I mean :P.

    I have analysed the default Kubrick theme for id’s and so on, nevertheless if you look at the comment_popup_link() function for example you can only pass one CSS class. The only solution i can think of in this instance is to pass span tagswith set classes for each state (below);

    <?php edit_post_link('<span class="edit-post-link"> Edit</span>','','|'); comments_popup_link('<span class="comments-link-off"> No Comments</span>', '<span class="comments-link"> 1 Comment</span>', '<span class="comments-link"> % Comments</span>','', '<img src="'.$url.'/images/icons/speechbubble_off.gif" /> Comments Off'); ?>

    I guess that is the only simple solution?

    There are a lot of people using icons in their comments. Personally, I think it’s too cutesy and clutters things up, but that’s MHO. You can search the forums here or through Google or Yahoo and I’m sure you will find plenty of folks who have solved this issue better than I can help you with. But, I do have a cool comment if/else statement based on Kubrick but a bit enhanced if you want to take a look and see if that helps.

    Thread Starter richardlee

    (@richardlee)

    Yeah but I like cutesy!..plus ive already gone to the trouble of designing the icons :P.

    Well thanks for your input, I think i’ll just make do with the span tags got to move onto my next challenge. A custom template.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘What is best way 2 add more CSS styling ability?’ is closed to new replies.