There is a WordPress feature that may be largely unfamiliar to many WordPress users. The use of Markdown within WordPress content allows simpler implementation of basic HTML elements. Essentially it’s a shortcut that allows you to quickly and easily add things such as lists, paragraphs, headings, links, images, and stylistic elements into your content on posts and pages. This allows you to focus on the content itself rather than worrying about formatting or syntax.
Enabling Markdown in WordPress
Markdown isn’t included in WordPress out-of-the-box, it can be enabled via the use of the ever-popular Jetpack plugin. Coming from Automattic, the company behind WordPress.com, Jetpack includes a dedicated module specifically enabling the use of markdown within any WordPress site. Using the Plugins section from within your WordPress dashboard, simply search for Jetpack to get started with writing markdown while creating your content.
Simply install the Jetpack plugin, connect your WordPress.com account and enable the Markdown module that resides within the Writing section. The module will handle the conversion of the markdown syntax into HTML every time you hit the Update/Publish button. There are also some alternative plugins to Jetpack for Markdown within the WordPress Plugin Directory.
Enabling Markdown for Comments
With the Jetpack plugin activated, you’re also able to enable the use of markdown within comments on your WordPress website. Simply visit the Settings => Discussion section in your WordPress dashboard and check the box under the Markdown heading to enable Markdown for comments.
Examples of Markdown
If you’ve never encountered Markdown before in its 12 years of existence, check out the syntax below to see how simple it is to use. The Markdown syntax is automatically converted into HTML code upon publishing of posts and pages on your WordPress website.
Important: When using Markdown on your website, please ensure to always use the Text editor and not the Visual editor. Using the Visual editor may cause unexpected results while working with Markdown.
1 – Lists
You can quickly create lists using the Asterisk character or simply by using numbers, like so:
* Item 1 * Item 2 * Item 3
1. Item 2. Item 3. Item
Or perhaps a combination of both to create a mixed list of ordered and unordered list items:
1. Item 2. Item * Mixed * Mixed 3. Item
2 – Code
You can add lines and blocks of code within your post or page content using the Grave Accent character:
`This is some code`
``` This is a larger snippet of code ```
You can also define a programming language and the Markdown syntax will render it fully formatted for easier reading. Over 30 languages are currently supported, including CSS:
```css .classname { background: #f00; } ```
3 – Headings & Titles
You can use the Hashtag character to create a heading, the number of hashtags denotes which HTML tag will be used, for example:
# H1 Heading ## H2 Heading ### H3 Heading #### H4 Heading ##### H5 Heading ###### H6 Heading
4 – Blockquotes
Using the Greater-Than character, you can create an endless structure of blockquotes, like so:
> This is a blockquote > > This is a blockquote within a blockquote
5 – Italics & Bold Text
You’re also able to apply an emphasis style to words by wrapping them with either single or double Underscore characters, like so:
_Italics Text_ __Bold Text__
Further Reference
Markdown can do more to allow you to add such elements as links, images, definitions, abbreviations, and even footnotes. This handy Markdown reference guide should contain all the information you may need to know more about using Markdown while writing content for your site.
Conclusion: Markdown in WordPress
Markdown can certainly be considered if you’re regularly adding elements such as code, lists or quotations to your content. It may take a short while to get used to the idea of writing just one or two characters to add HTML elements to your content, but once you get the hang of it you’ll wonder why you have waited all of this time to start working with Markdown.
Coupled with the distraction-free writing mode that arrived in WordPress 4.1, Markdown allows you to concentrate entirely on what matters the most – your content. What do you think of Markdown in WordPress? Have you ever used it and was it worth it? Let us know in the comments.
image sources
- WordPress Comments: pixelcreatures / Pixabay.com