Skip to main content
WordPress made easy with the drag & drop Total WordPress Theme!Learn More

Using Markdown With WordPress: A Beginner’s Guide

Last updated on:

WordPress.com had announced that they were introducing Markdown into their core features and allowing their users to use it when writing their blog posts, pages and comments.

When new features are added into the WordPress.com ecosystem it is a fairly good bet that before long they will be added to the WordPress.org software. Fans of Markdown have been waiting for this addition a long time. However, there are no doubt a large portion of the users who have no idea what Markdown is and why they would ever use it.

While Markdown is new to WordPress.com it has been available to use in WordPress.org for some time with the use of a simple plugin. One of these plugins, which we’ll talk about a little later, has been downloaded almost 25,000 times and has mostly been given a 5 star review by its users.

This tells us that it is popular and well built, but while there are users who love Markdown and the plugin we are going to be discussing, there is still a large percentage of the user base that still don’t know anything about it.

So let’s talk about it now.

What is Markdown?

what-is-markdown

Markdown is a plain text formatting system created in 2004 by John Gruber and Aaron Swartz. It was developed to allow people to compose richly formatted text for the web. At its most basic, Markdown is a text-to-HTML conversion tool for web writers. When it is used it converts text to structurally valid XHTML and HTML.

It is a system that can be quickly learned due to its simplicity and cuts down on any possible errors that happen when trying to format text with HTML code.

The primary design goal of markdown is to make text as readable as possible. The idea behind its creation was that documents written using the markdown syntax should be publishable as plain text documents without looking like they had been marked up with tags, or any type of HTML formatting.

Why Should I Use Markdown?

Markdown is a very useful tool because it is extremely easy to use and very quick to learn. It makes use of special characters and punctuation to indicate style and links. The characters that are used show how the document will be formatted as well as help style plain text documents for them to be easily viewed. When the document is published to the web these characters are converted to the appropriate style and format.

Writing in Markdown is extremely clean. As you use it the formatting translates to completed HTML styles. You don’t have to worry about missing any closing tags or nesting tags incorrectly. There’s no styling required inline which means you won’t break any of the formatting once it’s published to the web.

It is also a flexible and portable syntax to use. It allows you to output documents to multiple formats. While we are specifically discussing using it with WordPress, it is also easy to create that content offline in a text document and paste it directly into your editing window. This flexibility also allows you to convert it to a styled PDF or other formats without having to make any changes.

Using Markdown With WordPress

plugin

While Markdown hasn’t been introduced into the core WordPress software yet, it is extremely easy to add with a single plugin.

There are several plugins you could install to use Markdown on your blog, but in this post I’ll be talking about one called WP-Markdown. Once you have installed and activated the plugin you are then given several new options within the settings menu of the WordPress dashboard.

Markdown Settings

Under the Settings > Writing menu you can change the options to enable Markdown on posts, pages and comments. This menu allows you to enable the help bar for the post editor and comments as well as enabling a syntax highlighter option to help you get used to using Markdown.

markdown

As you use Markdown in your posts, your post editor window is split into two separate sections. The main window is used for writing your post and below this window you are presented with the post, fully styled. This window updates in real time that will allow you to quickly confirm that your styling syntax is correct.

Carrying out the basic styling with Markdown is straightforward. To make convert text into an H1 header tag you need to precede the text with a single hash. H2 headers are preceded with double hashes and each level of header is then marked with an additional hash mark.

Markdown uses asterisks as indicators of emphasis. In order to make a selection of text bold it needs to be wrapped with two asterisks. Emphasizing text with italics is as simple as wrapping the text in single asterisks.

Lists are added using various methods. For unordered lists you can precede list items with a single asterisk, a single plus or a single hyphen. For ordered lists you then simple use the number followed by a period as you would in any normal text document.

Creating links requires a little more thought but can be created really quickly once you are used to the correct syntax. In order to add a link you need to add the link text in between two square brackets and then the link itself should follow this link text in parentheses. An example of this would be: [WPExplorer](http://wpexplorer.com).

When referring to internal pages and posts you simply need to use relative paths for the link rather than the full URL.

Adding images to your post works in a similar way to adding a link. The alt text used on your images is added within the square brackets and the location of the image file is added within the parentheses.

You can also display code block snippets by preceding every line of text within the code block with four spaces. Each additional indent within the code can be styled with a further four spaces to make it easier to read.

Markdown uses email-style > characters to create block quotes. These work best when the each line within block quote is hard wrapped and preceded by the > character.

Download WP Markdown

Markdown may not be for everyone. But for those who want a quick and clean method of creating posts without having to worry about HTML or slowing down by removing your hands for the keyboard, it may be a method of writing that suits you.

It isn’t as expansive as using HTML to create your style choices but it will cover a vast majority of them and certainly those style choices that you will use 90% of the time.

Have you used Markdown with WordPress or have you used it in other programs? We’d love to hear you thoughts on Markdown and whether you think it’s a useful tool for WordPress websites.

wp-markdown-wordpress-guide
Article by Tom Ewer WPExplorer.com guest author
Subscribe to the Newsletter

Get our latest news, tutorials, guides, tips & deals delivered to your inbox.

2 Comments

  1. Gwyneth Llewelyn

    Now that was an interesting article — especially for those who never came across Markdown before!

    (It’s not my case… switching constantly between GitHub, Stack Overflow, Reddit, and the many Discourse forums, Markdown is sort of ‘second nature’ to me)

    Since this article is now a few years old, let me just add — for the sake of those hitting your article via Google — that the core WordPress.org does not seem to have Markdown support yet, but, on the other hand, you can add it through Jetpack, by just switching a slider! It works rather nicely, even though it’s not as fully-featured as WP-Markdown. It works even with Jetpack not connected to WordPress.com (for those that mistrust the integration with Automattic!).

    The sad thing is that WP-Markdown, at the time of writing this comment, seems to be ‘abandonware’ — perhaps because the author(s) didn’t think it was worth ‘competing’ with Automattic and their unlimited human resources 😀

    It’s a pity, since it was a very nice plugin, did its job well, but, alas, it’s not compatible with neither with WP 5.0+ (according to the comments), nor with the latest PHP versions, so it would be tough to update anyway…

    • Kyla

      Thank you for the update! And what a bummer about WP-Markdown plugin, maybe someone will adopt it and keep it up to date.

Leave a Reply

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

Learn how your comment data is processed by viewing our privacy policy here.