Title: Create shortcode based on Multiple Domain settings
Last modified: November 3, 2020

---

# Create shortcode based on Multiple Domain settings

 *  Resolved [q7048](https://wordpress.org/support/users/q7048/)
 * (@q7048)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/create-shortcode-based-on-multiple-domain-settings/)
 * Under the Multiple Domain settings, is it possible to have several variables 
   based on each domain such as contact telephone and email then display them on
   the frontend in a shortcode? E.g. [multiple_domain_phone] / [multiple_domain_email]
 * Any help would be more than appreciated 🙂
 * Best Wishes
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcreate-shortcode-based-on-multiple-domain-settings%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Gustavo Straube](https://wordpress.org/support/users/gustavostraube/)
 * (@gustavostraube)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/create-shortcode-based-on-multiple-domain-settings/#post-13625183)
 * Yes, it’s possible, but you’d have to create those shortcodes yourself. Here 
   you go an example:
 *     ```
       add_shortcode('multiple_domain_phone', 'custom_multiple_domain_phone_shortcode');
       function custom_multiple_domain_phone_shortcode() {
           if (MULTIPLE_DOMAIN_DOMAIN === "mydomain.com") {
               return "+1 888 555 5555";
           }
           if (MULTIPLE_DOMAIN_DOMAIN === "otherdomain.net") {
               return "+1 888 555 50000";
           }
           // One if per domain...
           return "";
       }
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Create shortcode based on Multiple Domain settings’ is closed to new 
replies.

 * ![](https://ps.w.org/multiple-domain/assets/icon-256x256.png?rev=2502840)
 * [Multiple Domain](https://wordpress.org/plugins/multiple-domain/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multiple-domain/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multiple-domain/)
 * [Active Topics](https://wordpress.org/support/plugin/multiple-domain/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multiple-domain/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multiple-domain/reviews/)

## Tags

 * [variables](https://wordpress.org/support/topic-tag/variables/)

 * 1 reply
 * 2 participants
 * Last reply from: [Gustavo Straube](https://wordpress.org/support/users/gustavostraube/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/create-shortcode-based-on-multiple-domain-settings/#post-13625183)
 * Status: resolved