• Skip to content
  • Skip to footer

WPSpeak

Main navigation

  • News
  • Blog
    • BuddyPress
    • Design
    • Giveaways
    • Roundups
    • Snippets
    • WordPress Multisite
  • Tutorials
  • Plugins
  • Reviews
You are here: Home / Snippets / Add Button for Horizontal Line in TinyMCE Editor

Add Button for Horizontal Line in TinyMCE Editor

WordPress uses TinyMCE editor which is good as this means you don’t have to write any single HTML code to write up your post. TinyMCE allows you to write your posts as easy as using Microsoft Word.

The default TinyMCE comes with very basic feature and shockingly there’s no button to add horizontal line in your post. Sometimes you might need to use horizontal line in your post to separate it into few segments.

Horizontal line

See that horizontal line separating those two paragraphs?

You can add the line using <hr /> tag. However, I feel more convenience to add the button to add that horizontal line so every time I want to add a horizontal line, I can simply click on the button.

To add the button for the horizontal line, paste the following snippet in your functions.php file or even better your functionality plugin:

For more info on customizing TinyMCE editor, please read the guidelines from WordPress Codex – TinyMCE. Credit to WPSnipp for the snippet.

Filed Under: Snippets

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Footer

Contact us

Support Email

About us

WPSpeak is a site dedicated for WordPress news, tutorials, code snippet, themes and plugins. Founded in January 2013, it's aimed to provide high quality WordPress resources for all WordPress users.
Learn More

Follow us

  • Facebook
  • Github
  • Google+
  • Instagram
  • Pinterest

Copyright © 2018 · WPSpeak · All Rights Reserved.

  • About us
  • Advertise
  • Write for us
  • Terms and Conditions
  • Privacy Policy
  • Contact us