How to Use Shortcode on My WordPress IDX Real Estate Website?

WordPress has an internal scripting language known as Shortcode. It is powerful and intuitive. And it can help real estate agents automate their WordPress IDX website and get back to what they do best, which is selling homes.

In this blog we will review how to optimize Shortcode to fit your website and business needs. If you are worried about coding, don’t be. We’ll go step by step, so everyone can take advantage of Shortcode regardless of technical experience.

What Exactly Is Shortcode?

Shortcode is a tag you can add to your WordPress pages, posts and themes that tells WordPress to run a predefined script on your site. For example, you might use the gallery Shortcode in a post. In the back-end you type [Gallery]. WordPress recognizes this tag, runs the gallery script, and upon saving your post automatically includes an image gallery that you can populate.

wordpress shortcodeWhy Should I Bother to Learn Shortcode?

A better question might be, why shouldn’t you learn Shortcode? From the example above, you can see how simple and intuitive Shortcode is. It does not take long to learn and it can help you build a more functional, more elaborate website, faster. WordPress likes to say that Shortcode means shortcut.

What Are Some Popular Shortcodes I Can Use Today?

You can use predefined Shortcode for dozens of functions on your WordPress IDX site. These shortcodes are native to WordPress. Some of the most popular are:

[youtube] which embeds YouTube video

[soundcloud] which embeds audio from SoundCloud

[gallery] which inserts an image gallery

[instagram] which embeds an instagram image

[scribd] which can embed a pdf or other documents from scribed

[googleapps] which can let you embed a Google doc

[slideshow] which will embed a slide show presentation

[contact-form] adds a contact form.

There are many, many more ready-made Shortcodes you can use. WordPress lists a number of them (with full instructions) in their support documentation.

In addition, many WordPress plugins also come with their own shortcodes that you can use on your site.

realtyna shortcodeHow Do I Add Shortcode to a Page/Post?

Adding Shortcode to a post or page is easy. Simply create a new post or page. Add the content you wish to add, and then copy the shortcode in the location you want it to appear.

Can I Create My Own Shortcode?

Yes! Shortcode is flexible, so you can easily create your own and add it to your site. Creating your own Shortcode is a bit more involved, so you may want to start with a Shortcode plugin first. These plugins come with dozens of pre-made Shortcodes and tools to customize them before adding them to your site. Here are some highly regarded Shortcode plugins: Shortcodes Ultimate, Vision, Intense, and WP Shortcode.

realtyna idxIf you want to create your Shortcode from scratch, you are going to have to do some coding in your functions.php file. The first thing is to define a function. Here is a simple example provided by WordPress.


function foobar_func( $atts ){    

return “foo and bar”;


Then you need to pair this function with a tag, and add it as a Shortcode.

add_shortcode( ‘foobar’, ‘foobar_func’ );

Whenever WordPress, sees your tag [foobar] it will run foobar_func. This is a base example. Depending on your task, the functions you write can get fairly complicated. WordPress has more details on its Shortcode page.

How Can I Use Shortcode to Add IDX to My Site?

Realtyna’s WPL plugin and Organic MLS Integration add-on allow you to add IDX to your WordPress website. Once installed and connected to your MLS, simply insert the following shortcode to any page:


This code tells WordPress and the Realtyna software to display the IDX listings on that page. For a demo of how WordPress and Realtyna work together, check out our demos.  

So now you know how to use Shortcode on your WordPress IDX Website. Questions or feedback? Leave them in the comments, or for more Realtyna content, check out 8 Facebook Video Tips for Real Estate Agents.

*Please note: Not all plugins are 100% compatible with other plugins, solutions or Realtyna products. Please confirm or test compatibility with your solutions before implementing. While we are happy to help you find a compatible solution, we do not endorse any 3rd party products. Suggestions are only made for reference or guide.

Rate our blogs


The opinions or information expressed in this article are those of the author and do not necessarily reflect the official views, policy, or position of Realtyna. The information on Realtyna’s Website is general, for informational purposes only, and is not to be relied upon or interpreted as real estate, legal, accounting, or other professional advice or a substitute. Please discuss anything related to the certification process, professional advice or legal procedures with your MLS providers.

Stay Up To Date

Get the Knowledge you need Delivered Straight to your inbox

No Comments

Sorry, the comment form is closed at this time.