That’s probably basic PHP. As all that’s needed would be some kind of map/array and then switch use the id
according to what get_locale()
returns.
<?php
// Provide a map if locales and shortcode IDs.
$custom_footer = [
'ar' => '319',
'en_US' => '3181',
// ... and so on
];
// Get the current language.
$current_language = get_locale();
// Get the right shortcode ID.
$shortcode_id = $custom_footer[$current_language];
?>
<?php echo "Just for debugging, the current language is: " . $current_language; ?>
<?php echo do_shortcode("[INSERT_ELEMENTOR id='" . $shortcode_id . "']"); ?>
Related Posts:
- Custom shortcode being executed when saving page in wp-admin
- Change appearance of shortcode text inside editor
- Shortcode outputs at the top of the_content
- Escaping quotes from shortcode attributes
- Short code to display a loop
- How can I just get content inside a shortcode or just outside
- Custom Shortcode AJAX 400 Bad Request
- WordPress core responsive video not working with shortcode
- conditional shortcode not working
- Ajax not returning anything on form submit
- Wraping $content into link with shortcodes
- Simple contact form with field validation
- Remove empty p-Tags in Shortcode content before non p-Tags
- What is a short code?
- Using do_shortcode with variables?
- Using ACF field in do_shortcode()
- Remove hyperlink on gallery shortcode
- Wrap shortcode inside custom block
- Instagram URL is converted into oEmbed
- Shortcode with no attribute but has value
- Remove wpautop from specific shortcodes only
- Combining similar shortcode functions?
- unwanted P tags in shortcode, delay wpautop not working
- Shortcodes and a list of IDs?
- Shortcode adding plugin output before post, instead of inline [duplicate]
- How to build a shortcode which can insert a query string into a DB table
- What is the Correct way to pass parameters in function
- Shortcode – Getting Categories appears on top of website
- Visual Composer integration [closed]
- How to Modify WordPress Default Image Gallery Shortcode
- Passing html tags as shortcode parameters
- Include tags in the body of a post
- no content after shortcode
- Button Shortcode
- Place a URL parameter value inside a WordPress short code
- Shortcodes in excerpts returning empty string
- Scripts for shortcode: concatenate or load separately? [closed]
- Print shortcode in defined area
- WordPress shortcodes are not working
- How to use/enable Pagination?
- Wrap Shortcodes and wpautop
- Placing tags on wordpress visual editor using shortcodes
- Shortcode called twice
- Favorite websites with shortened hyperlinks
- Best way to find all shortcodes that come with WordPress
- Using Variables in Shortcodes
- Default Attributes in Shortcode Not Working
- Replacement for gallery_shortcode function not taking all attributes
- Shortcode syntax errors
- Passing variable in nested shortcodes
- Shortcode Always Displays Default Attribute Value
- how can i pass this attribute in this shortcode?
- Display a form partially with a shortcode
- How do I fit a function inside an opening and closing do_shortcode
- Modifying the wordpress login page and then referencing it with a shortcode problem
- How to make shortcode which returns HTML?
- Render shortcodes with get_post_custom
- Add shortcode within the_content()
- How to create a custom shortcode for custom login form?
- Enclosing Shortcode not working in a Template
- Set redirect for need login
- make user_id in a shortcode dynamic based on who’s logged in
- pass complex json as shortcode parameter
- Image Caption Shortcode Broken upon update
- Shortcode not working in CPT taxonomy
- wp_enqueue_scripts does not work on admin page
- How to include shortcodes and pdfs in WordPress search without plugin?
- How to embeded shortcode for another website
- To know whether insert shortcode in custom meta box
- the_content() not showing the content in good order (with a shortcode)
- Execute shortcode in backend
- Shortcodes not working in custom page
- Get label in user meta query
- Shortcode not being executed
- How do I point bloginfo(‘stylesheet_directory’) to my parent theme?
- Add audio file to post using custom term meta field as link [closed]
- Display tags cloud from a specific category ID with a shortcode
- How to list child pages with excerpts, e.g. [child-pages depth=”1″ excerpt=”1″]
- Add a shortcode in woo-function.php
- Woocommerce products shortcode specific order
- Modify Blog Module layout in Child theme
- Video shortcode outside WordPress not working with IE and mediaelement’s Flash fallback
- Display title of child pages in shortcode
- Output html source tags inside shortcode
- How can I define the output of shortcode attribute value?
- Clarify: Enqueueing scripts within shortcode only loads in footer?
- What is the best way to include a template file within a shortcode?
- Shortcode templates
- Create plugin/function to catch XML-data via Shortcode
- Why My slider shortcode display above header
- Does anyone recognize shortcode ig_special_heading?
- How to scroll to a shortcode-generated anchor
- add post type pram to wp shortcode
- Shortcode conversion to hrml when post is published
- Shotcode error on functions
- Shortcode for displaying the user’s first name?
- Can I prevent wordpress adding and tags to autoembeds
- Shortcode – Display inline icon before text [closed]
- Why does my shortcode query not working with search term
- How to use multiple values in “Shortcode”? [closed]