Skip to content

MD Shortcodes Guide

Refer to this doc for every shortcode available in the MD theme and every official Dropin. Pass in parameters to customize output and easily place powerful content all over your site.

Developer tip

You can render any shortcodes in templates with the do_shortcode() function.

<?php echo do_shortcode( ‘[md email title=”Test”]’ ); ?>

1. [md_email]

Display highly customizable email forms connected to your MailChimp, ActiveCampaign, AWeber, and other email marketing integrations.

Example

Like this email form?

It can now be used in your posts with a simple shortcode. To get alerted of new features like this, join the newsletter:

Copy shortcode

[md_email title=”Email Form Title” desc=”Some description text” bg_color=”#0073aa” bg_image=”https://domain.com/img.png” attached=”true” text_color=”white” classes=”text-center”]

Parameters

  • title=”” Set the title attribute to adjust the headline that shows at the beginning of your form.
  • desc=”” Use this to describe more about your newsletter here.
  • list=”” Set a list ID for this email form to subscribe to
  • bg_color=”” Set a background color using a color code.
  • bg_image=”” Set a background image to any URL.
  • email_input_name=”true” If set to true, show name field in email form
  • attached=”true” If set to true, the email fields and submit button will attach to each other.
  • name_label=”” Change the name field placeholder label
  • email_label=”” Change the email field placeholder label
  • submit_text=”” Change the submit button text
  • footer=”” Add footer/disclaimer text to the bottom of the email form
  • text_color=”” Set to white for white text, set to dark for dark text. You can write your own CSS class for this as well if you want a custom text color. Any value you enter here will be prefixed as a CSS class like text-{text_color}.
  • classes=”” Add any custom classes to the email form for more customization.

2. [md_popup]

Trigger MD popups on the click of a button, text, or image. Customize text parameters and create call to actions like content upgrades within posts.

Tip: To get a premade shortcode for each popup, go to MD > Optins > Popups and click “Copy shortcode”

Examples

Button popup

Join the MD newsletter

[md_popup id=”popup_id” type=”button” text=”Join the MD newsletter” classes=”mb-single]

Text link popup

Hey, you should subscribe to the newsletter.

[md_popup id=”popup_id” type=”link” text=”subscribe to the newsletter.”]

Image popup

Add alt text here

[md_popup id=”160rXS1″ type=”image” image=”https://marketersdelight.com/wp-content/uploads/2015/07/marketers-delight.png” text=”Add alt text here” classes=”mb-single shadow”]

Parameters

  • id=”” Enter the popup ID to display on click
  • type=”” Show trigger as a button, link, or image.
  • text=”” Enter the text to display or use as alt text on images
  • image=”” Enter an image URL to display as the background image
  • classes=”” Add custom MD helper classes and other CSS classes

3. [book]

With the MD Books dropin enabled you can output one book or a collection of books with this shortcode.

Examples

Show collection of random books

[book row=”3″]

Show book(s) by post ID

[book id=”907, 805, 450″ row=”3″]

Show books with excerpt text

[book id=”907″ type=”excerpt”]

Parameters

  • id=”” Enter the post ID of the Book(s) to output, separate with comma
  • type=”” Set to excerpt to show title and links
  • count=”” Set to the number of random books to display on page load
  • row=”” The number of columns books to show per row

4. [fn]

Link to a footnote anywhere in post content with MD Footnotes.

Example

Add sources and sub-messages into your text with MD Footnotes[fn id=”JJoFF42″]. With a simple meta box in the post editor[fn id=”MJuGF42″] you can easily create and manage footnotes and simply reference them with the fn shortcode.

Add footnotes from WordPress post editor

Copy shortcode

To get the shortcode for any footnote, copy the yellow highlighted text next to your footnote and paste it into the location you wish to show that specific footnote in the post content and blocks.

Parameters

  • id=”” The ID of the footnote to reference
  • align=”” Set footnote to align right

Alex Mangini

Hi, I'm Alex! I started writing about web design and blogging at 13 years old, which turned into client work, which led to building my own software. 15 years later I'm still at it, and Marketers Delight is the epitome of my philosophy for building on the web.

Loading new replies...

Avatar of MD.com
MD.com

The Messenger

47 messages 34 likes

Did you know there are some powerful shortcodes built-in to MD?

You can now follow this new guide to see what shortcodes are available on your site and exactly how to customize all of their parameters.

Shortcodes can be timely when you need them but for sitewide content organization purposes MD tries not to include too many in the theme. You will see shortcodes when they serve a very valuable use case to any given feature, such as the md_popup shortcode which I use all of the time!

More guides coming soon to show MD widgets, blocks, and other features.

Read the full guide

Reply 1 like