Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I know there are plugins that do this, but since my needs are so small, I'm hoping there's another solution...

I want to edit the <hr /> style in the WordPress editor to have clear: both;. Is there a way to do this in the functions.php or something?

share|improve this question
1  
This sort of thing is best done with CSS. Just add the necessary CSS rule to the style.css in your theme folder (/wp-content/themes/theme-name/). –  dalbaeb Jun 3 '13 at 19:36
    
That doesn't seem to work. –  Rev Jun 3 '13 at 21:17

1 Answer 1

up vote 1 down vote accepted

@dalbeab already answered your question, but thought I would point out a way to add horizontal rule to your editor if you wish.

Within functions.php, you can add this:

// add horizontal rule button
function enable_more_buttons($buttons) {
    $buttons[] = 'hr';
    return $buttons;
}
add_filter('mce_buttons', 'enable_more_buttons');

Then you will have a TinyMCE button that looks like this which will let you add an <hr /> with only 1 click:

enter image description here

share|improve this answer
    
Actually @dalbeab's answer didn't work. –  Rev Jun 3 '13 at 21:17
2  
You are talking about editor styles as opposed to the styles the end user sees? In that case you want to look at: Function Reference/add editor style « WordPress Codex –  GhostToast Jun 3 '13 at 21:31
    
Thanks, that helped! –  Rev Jun 4 '13 at 15:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.