WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Somehow the WordPress editor doesn't have a button to insert a horizontal line (<hr /> in html). Is there a plugin that adds this button? Or an easy way to add such a button myself?

share|improve this question
I am upvoting your question not because for me it is something hard to make, but because I am curious to understand why it is not included by default in the editor. Probably it has to do with the fact that HTML shouldn't care about the graphics, but only about the content (and therefore you should prefer using css border property to achieve the same result) ? – jj_ Jan 10 '14 at 2:43
up vote 7 down vote accepted

There's an easy way. Open functions.php and add this code. It works for many html entities

// got this form http://www.sycha.com/wordpress-add-hr-button-tinymce-visual-editor

function enable_more_buttons($buttons) {
  $buttons[] = 'hr';

  Repeat with any other buttons you want to add, e.g.
  $buttons[] = 'fontselect';
  $buttons[] = 'sup';

 return $buttons;

add_filter("mce_buttons", "enable_more_buttons");
//add_filter("mce_buttons_2", "enable_more_buttons"); // add to second row
//add_filter("mce_buttons_3", "enable_more_buttons"); // add to third row
share|improve this answer
The TinyMCE documentation has a list of all buttons available in the standard distribution. – Jan Fabry Dec 29 '10 at 8:16
I'm not sure if I found the right functions.php ... when I added it to the end of wp-includes/functions.php, I got an error that "add_filter" was not found. – Hinek Feb 12 '11 at 10:14
@Hinek I´m sorry for the terribly late answer, but we are talking about the functions.php file located within your theme... but at this point, maybe you found out already! – Sergio Majluf Apr 14 '11 at 0:12

Your Answer


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.