We are building a new web site and using Word press for the blog.
The designers have given us the templates for the blog theme where specific css classes are applied to things that are generated automatically by word press. These CSS selectors/rules are all in the main "styles.css" that apply to the whole site, not just the blog/theme.
All the little widgets and controls like comments, edit, next, previous etc... that are need for every post and every blog page have some defined class but the dom elements in their template are not necessarily a match for what is generated by WP
Some of these I can wrap in a div and apply a class and it works. others have a class automatically generated from with WP php code that "clobbers" my class. soooo....
My question here is one of strategy/best-practices .
Example from the designers we get things like:
<a class="action" href="#">Continue Reading</a>
<a class="action comments" href="#">6 Comments</a>
in the case of the comments it was simple just wrap the PHP in a div and apply the classes:
<div class="action comments" ><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></div>
this worked fine...
But this does not work for the Edit link button
<div class="action><?php edit_post_link('Edit', '', ' | '); ?> </div>
because the edit-post-link PHP generates it's own class: and we have this as output:
<a class="post-edit-link" href="http://our-new-domain.com/blog/wp-admin/post.php?post=4&action=edit" title="Edit Post">Edit</a>
I have two choices... I can go into the main style sheet and add "post-edit-link" to all the CSS selector rules which now just select ".action" (there are lot of them!)
I can hack the php edit_post_link file or handler, to change the class.
is there a some other way which I would like be enlightened on... to customize all these small generic blog widgets/links through some settings GUI where I could set the class that is generated by:
<?php edit_post_link('Edit', '', ' | '); ?> </div>
to "action" so that we get this output:
<a class="action" href="http://our-newdomain.com/blog/wp-admin/post.php?post=4&action=edit
" title="Edit Post">Edit</a>
as a custom setting that would be preserved over and upgrade?
The first option seems safest, but it messy, because it adds more bloat to the main css file, OTOH, I suspect if I touch the edit_post_link script, then when we up grade WP this will get over written and I lose it.
What is recommended?