you are trying to output the value of an ACF field containing an embed code for a Google Map as a shortcode within your WP theme files . If the shortcode is not being executed, the get_field() function may be returning the raw value of the field rather than parsing it as a shortcode.
Replace your_google_map_shortcode with the actual shortcode name that you’re using for embedding the map.
<?php
// Check if the custom field has a value
if (get_field('zemelapis')) {
// Get the raw value of the field
$field_value = get_field('zemelapis');
// Check if the field value contains a shortcode
if (has_shortcode($field_value, 'your_google_map_shortcode')) {
// Execute the shortcode
echo do_shortcode($field_value);
} else {
// If no shortcode found, output the raw value
echo $field_value;
}
}
?>
Related Posts:
- how to insert data in wordpress table usnig jquery ajax
- Hack-Proof OR Security in WordPress — is it real?
- What does making sure “that your theme is WordPress header and footer tag enabled” mean?
- check if a file in a plugin folder exists from a locale installation
- Is wp-app.php or wp-apps.php needed for WordPress?
- WooCommerce: Disable Taxation for Specific Address [closed]
- How to distinguish if a plugin is not installed or just not active
- JavaScript in a PHP plugin
- Checking the count within a foreach loop
- Remove specific plugins and themes from the Dashboard->Updates page [duplicate]
- Move plugin-settings to ‘Settings’-menu in the admin
- Installing wordpress on a subdomain of an already existing static website
- Meta query for comparing two dates
- Can’t activate Plugin: unexpected T_STRING, expecting T_FUNCTION [closed]
- Slashes stripped in ACF
- How do I add some javascript validation to the admin interface form’s onsubmit?
- Login problem after installing my written plugin [closed]
- How to prevent plugins from sniffing/stealing other plugins’ options?
- Is there a plugin for feedback like Kissmetrics available? [closed]
- Mask and Track Outbound Links
- Shortcode does not expand in Facebook like
- Hook for page Request?
- How do i show different group of images below a button when the button is clicked on the same page in wordpress? [closed]
- How to do database for download stats?
- Comment IP Plugin – Fixing onfocus=’this.select()’
- Plugin Admin Menu Boiler Plate
- why need theme,if page builder is there in wordpress [closed]
- Is it possible to instantiate a new WC_Cart?
- How to redirect to a page after the form is submitted
- Exporting Custom Taxonomy in plugin
- Posts to have category specific sidebars with the widgets
- Add background image/layout for single page?
- Separate jQuery for Individual Comments?
- Does WordPress check for updates of a plugin via plugins root folder name?
- How to write a new file when new post has been published in WordPress
- Need to add/remove group of options and display them as rows
- Displaying number of drafts in Posts section of admin sidebar [closed]
- Looking for a PayPal donation plugin similar to JoomDonation [closed]
- Pdf visualiser embedded into wordpress website
- Using call_user_func() within add_settings_section() within a Class
- Paypal Framework
- admin bar disappears completely in 2010 theme
- custom wordpress theme and yoast seo injecting text in body
- Show views count for pop up post
- Fatal error “Call to undefined function is_plugin_active” each time the plugin is activated
- Block content with popup
- How to check if short code is present in template?
- How to uncheck this automatically from all wordpress posts?
- front end editor creation for Restropress plug in – displaying information from a WP admin area, on a different URL
- Clean old users
- How to make WooCommerce multiple filter with custom meta fields
- One WooCommerce Store to multi distributor sites
- How to use third-party SendGrid Email Validation API in Gravity Forms?
- Cannot display wordpress thumbnail
- WordPress User profile with Avatar upload on the front end without plugin?
- How to change the width of certain paragraph or header blocks?
- Cron job shedules replace?
- Only return taxonomies that are linked to a category & product
- Settings Fields not showing up in Submenu Page
- Multiple CF7 Forms causing multiple recaptcha requests
- Trying to remove a couple categories from shop page
- Enabling plugin on specific pages and subpages
- Product slider not showing when clicking on tabs
- Custom plugin issue – Notice: Trying to get property of non-object in
- jquery plugin won’t fire when hamburger class element clicked
- fetch price from different table woocommerce
- WordPress show descriptions under images in gallery
- Widget display in theme
- Can i add custom code in Source in specific page, Header from function.php?
- Permission Issues regarding Plugin updates & FTP transfers
- ACF Query result in a new td (echo)
- Delete user meta based on key value that is an array
- Plugin to Delete All Posts Monthly
- How to write wordpress plugins faster to load?
- mailjet plugin – extend functionnalities and reuse api
- Using permalinks with parameters
- How to add featured image on front end form?
- plugin not working for adding post to page
- Put folder in theme via plugin
- URL Rewriting from a Plugin based on custom values
- Plugin menu replaced by another plugin?
- How to use Repeater field of advance custom field
- Buddypress Plugin for register user from other site’s [closed]
- WordPress plugins not showing after switching servers
- Creating fields in the database
- Scrolling Ads? Live scrolling widget, not random on refresh
- Permissions question [closed]
- Output dropdown results into Woocommerce Order details
- How to manually remove preload fonts settings in WordPress?
- How to block external download link access if visitor not referred from WP?
- Display products based on sub-categories
- woocommerce add variable after price
- How to skip woocommerce PayPal redirection?
- Auto Stock Update after Order cancel from Admin of Woocommerce?
- Notifications Bar on home page only
- how to embed a crop feature for cropping images uploaded by the user
- Render CMB2 select option to post page [closed]
- How can JavaScript code be added before the closing HTML body tag?
- What is the best way to override functions of thirdparty plugins?
- How to move a post in Vacancies so it appears in News/Events?