• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

nSiteful Web Builders

Building a Better Web - One Site at a Time.

  • Home
  • About
    • Testimonials
    • Resources
  • Web Sites
  • Online Marketing
  • WordPress Support
    • Customized WordPress Training
    • 60-for-60 Sessions
  • Web Applications
  • Blog
    • Archive Listing Minimalistic
    • Blog Articles Grouped by Category
    • Case Studies
    • General
    • Portfolio
    • Reviews
    • Snippets
    • Techniques
  • Contact Jeff
    • Purchase Retainer Consulting Hours
    • About Retainer Consulting Hours

By Jeff Cohan, December 9, 2018

How to Reuse Content in WordPress with the amr shortcode any widget Plugin

Last updated December 12th, 2018 at 09:55 am

Whenever you’ve entered identical content in more than one place in your WordPress Web site, have you wished there was a better way?

Well, there is.

There’s a plugin for that!

There’s a plugin for that: the amr shortcode any widget WordPress plugin.

Description from the WordPress repository:

Insert a widget or multiple widgets or a entire widget area (sidebar) into a page using a shortcode.

Here’s how it works, in a nutshell:

As soon as you install and activate the plugin, the contents of any widget you create (and already created) can be displayed virtually anywhere on your site by using a special shortcode.

Let’s look at a few simple examples

1. Call-to-Action buttons

If you’re not including calls-to-action on your Web site, you should. And not just in sidebar widgets. You probably should be placing them within the content area of various pages, maybe even multiple times in a single page.

For example, if you’re presenting benefits of a product or service, include a call-to-action button after each benefit, like so:

screen capture of CTAs for amr shortcode any widget
Click to enlarge

2. Company address

It’s common to display a company address in the footer of a site and also in the body of the Contact page.

3. Affiliate disclosure

If you have affiliate relationships with businesses whose products or services you review, endorse, recommend, etc. on your site, you’re required by law to display an appropriate disclosure. One way to meet your legal requirement to place a disclosure on any page or post related to one of those products or services, like so:

screen shot of an affiliate disclosure for amr shortcode any widget
Click to enlarge

Does this sound familiar?

If you’re thinking this sounds a lot like how you would insert a Gravity Forms form or a TablePress table — or content elements from any number of plugins you’ve used — into a page, post, or widget, then you’re on the right track. Essentially, the amr shortcode any widget plugin lets you create a master content element and then insert instances of that content element wherever you want.

Furthermore — and this is probably the greatest feature of the plugin — if and when you update the master element, all instances of that element are automatically updated.

So, if you want to change the text of your call-to-action button, or your address changes, or you want to modify your affiliate disclosure, simply modify the master content element, and all the instances will be updated!

How to use the amr shortcode any widget WordPress plugin

1. Install and activate the plugin.

Two things will happen immediately:

a. Every widget you previously added to a widget area will be assigned a shortcode with a unique ID. That ID will be comprised of the widget type and a unique number. Here are screen shots of a Navigation Menu widget and a Meta widget, both previously entered into a main sidebar:

b. A new widget/sidebar area, called Widgets for Shortcodes will be added:

screen shot of amr shortcode any widget area
Click to enlarge

2. For inserting an existing widget into a page, post, or other widget area:

Simply copy the unique do_widget shortcode and paste it where you want the content to appear. So, if for some reason you wanted to display the “Meta” widget content in the content area of a page or post, you would simply enter this:

[do_widget id=meta-3]

3. For inserting content that is not already in a widget — and that you don’t want to appear in any standard widget area:

Let’s say, for example, that you want to insert instances of the Affiliate Disclosure content in various pages and/or posts but do not want to have it appear in any of the standard widget areas. Just drag a Text (or Custom HTML) widget to the Widgets for Shortcodes widget area, add the content you desire, and save it. After saving that widget, it will be assigned a shortcode with a unique ID. Then insert that shortcode wherever you want, just as above.

Note: The plugin author recommends that you add the widget to a normal sidebar/widget area first, check to make sure it works, and then drag it to the Widgets for Shortcodes widget area. Not a bad idea, but not required.

But wait, there’s more!

A very cool feature of the amr shortcode any widget plugin is that you can use the plugin to insert widgets that themselves include shortcodes!

“When would I want to do that?” you ask.

I’m glad you asked.

The simplest example that comes to mind is if you want to embed a WordPress image gallery in multiple locations — especially if you intend to modify that gallery over time.

screen shot of a WordPress gallery for amr shortcode any widget
Click to enlarge

The WordPress gallery feature generates a shortcode which, in its simplest form, looks like this:

[gallery ids="100,101,102,103,104"]

If you were to insert that shortcode into all of the pages where you want the gallery to appear, you’d be in trouble when you add or delete images to/from the gallery. Namely, you’d have to go back into all of those pages and edit the list of IDs.

Instead, create a simple text widget containing the above gallery shortcode in the Widgets for Shortcodes widget area, save it, and insert the new amr do_shortcode shortcode into those pages. Thereafter, when you need to change what’s in the gallery, simply modify the image ID listing in the Widgets for Shortcodes widget area, and the gallery will automatically be updated in all of the pages.

I wrote about another use case for the amr shortcode any widget plugin — admittedly rather esoteric — here, in the post entitled Add Dynamic Table of Contents to a Series of WordPress Posts

Final Thoughts

I’d love to hear from you if you have other ideas about how to use the amr shortcode any widget plugin. Also, of course, I’ll be happy to answer any questions you have.

Related Posts

  1. Add Dynamic Table of Contents to a Series of WordPress Posts
  2. How to Build Stunning WordPress Photo Galleries Quickly and Easily With FooGallery PRO
  3. Custom extensible PHP shortcode function for non-WordPress Web sites
  4. Dynamic Photo Galleries with Responsive Lightbox & Gallery
  5. Tipsy WordPress Plugin from iThemes
  • Choose the best match.

Written by Jeff Cohan · Categorized: Techniques · Tagged: Plugins, Shortcodes, WordPress

  • Choose the best match.

Reader Interactions

Leave a Reply Cancel reply

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

Primary Sidebar

mailchimp signup

Subscribe to get notified when new articles are published. Unsubscribe any time. No spam. I promise. Check out my newsletter archives.

social

Twitter Facebook LinkedIn

Recent Articles

  • Use Case for Custom Post Type: “In The News” March 10, 2023
  • Create a Custom Shortcode to Display a MemberPress Membership Price ANYWHERE on Your Website February 5, 2023
  • Avoid Direct Styling; Use CSS Instead September 21, 2022
  • Blog Tags: What They Are (and What They’re Not) August 5, 2022
  • How to Create a Simple Custom Events Plugin May 24, 2022

Filter By Category/Tag

Categories

  • Case Studies (7)
  • General (61)
  • Portfolio (5)
  • Reviews (12)
  • Snippets (16)
  • Techniques (38)

Popular Tags

Advanced Custom Fields Blogging Child Themes Content Marketing CSS CSS Grid Customer Service Custom Fields Custom Post Types Diagnostics Facebook FooGallery Genesis Gutenberg HTML Images iPhone Libra Live Chat Marketing Media MemberPress MemberPress Courses mu-plugins MySQL Photo Gallery php Pinterest Plugins Post Formats Pricing Project Management Security SEO Seth Godin Shortcodes Social Networking Surveys Taxonomies Trello Twitter Video Web design Web forms WordPress

siteground wp hosting

Web Hosting

wp101

EasyWordPresstutorialvideosforbeginners.
MemberPress CTA

Footer

Background

Web Sites | WordPress Support | Web Applications.

Formally trained in liberal arts and education (I have a B.A. in Government from Harvard and studied Secondary Education at Rutgers Graduate School), I have honed my skills in the communication arts and sciences as a teacher, trainer, instructional designer, writer, photographer, calligrapher, helpdesk manager, database programmer, and multimedia developer.

(I've also been a group counselor, waiter, bartender, bicycle messenger boy, computer salesman, carpenter's helper, financial analyst, and school board president.)

Tech

Systems since 1983.
Web sites since 1994.
PHP since 2001.
WordPress since 2007.

Contact

770-772-5134
Email Jeff
Send Money
All Ways

Copyright 2023, nSiteful Web Builders, Inc.

 

Subscribe

Pardon the interruption. I know popups can be annoying. But I’d love to have you as a subscriber.

Sign up to be notified when new articles are published. Unsubscribe any time.

* indicates required

Powered by MailChimp

×