WordPress: Padded Text Shortcode

This shortcode can be used to display blocks of text with a left/right margin. This pushes the text into the middle of the page/post, and makes it appear thinner than the rest of the content.

You can view an example of this shortcode in this post.

This shortcode will display text pushed into the middle like the example below:

The default margin on the text will be 50 pixels on both sides. This can be changed using the “padding” parameter like this:

This would push the text into the middle of the post/page with 250 pixels of space on the left/right side.

Article tags: center, centre, textbox, margins

Was this article helpful?


  1. Adam

    Hi Phill, where do we find the full list of Pig Dig ‘Short Codes’ for your themes?

Leave a comment

The link to your website will be visible to support staff only. It will not be shown publicly.