You should place that code in an HTML block, not a text block.
You can create a new block, type HTML
in the search bar and select it. Then paste above code in that new block.
Related Posts:
- Return $post_id when DOING_AUTOSAVE?
- Including Angle Brackets In Pre Sections
- Anchor Text code string is automatically modified by WordPress
- WordPress is converting & to & inbetween [code] brackets
- Notice: Undefined property: wpdb::$current_post What can be wrong?
- Where to save common libraries?
- source code: WP_INSTALLING vs. WP_SETUP_CONFIG in setup-config.php
- Sublime Video: Playlist which gets all attached videos
- Code Friendly Block Quotes
- Remove line breaks from ?
- How to fix a “globals” issue to avoid a rejected theme?
- Need resource on available functions and objects
- WordPress wp_insert_post() returns 0 but not not wp_error
- I want to remove the home page header image from all other pages
- Proper implementation/use of code/syntax highlighting
- How to remove all comments from JS, HTML, CSS files?
- What data validation we must use in different contexts?
- Need To Post Unformated Code
- Sidebar login: How do I get the username to show after “Welcome”?
- How to manage multiple wordpress project with shared code base
- Block IP Addresses using Code [closed]
- Find Total Authors
- Why does HTML entities are still encoded in Code Block?
- How to create a checkbox to show/hide a field in WooCommerce checkout [closed]
- How to pass https://achecker.ca/ validator? [closed]
- How to write custom code on WordPress?
- Remove Metaboxes
- Google analytics won’t work in wordpress
- Where do I add an action hook & callback in my theme?
- How do I reset my footer.php to its original state? (theme: Origami)
- Commenting out in HTML editor breaks template
- wordpress prepare error
- Adding code to send referrer on login page
- Table styles disappear when updating content
- Manage recurring event time
- wp_editor save all content
- Need an elegant solution to declare the value of two variables based on the count of the post
- How to insert integration code for CRM?
- A good way to include snippets of code in both posts, pages and Event Manager Template files?
- Anchor Text code string is automatically modified by WordPress
- Return $post_id when DOING_AUTOSAVE?
- Changes in code only show after changing theme
- Code Highlighting in BlockQuote
- feed url problem
- Where do I go to add a tag before the closing body tag?
- Embedding a custom live chat (gen. from Salesforce) into my WordPress header
- This page didn’t load Google Maps correctly. See the JavaScript console for technical details
- This page didn’t load Google Maps correctly. See the JavaScript console for technical details
- (Google Map API) Geocode was not successful for the following reason: REQUEST_DENIED
- function updateMap for Google Maps API
- This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console
- Type error: cannot convert the series to
- ReferenceError: google is not defined
- google map API zoom range
- JSON to pandas DataFrame
- How can I change the color of a Google Maps marker?
- InvalidValueError: not an instance of HTMLInputElement
- Using google API to tell how busy a place is
- Can not solve: Geocode was not successful for the following reason: OVER_QUERY_LIMIT
- Google Maps API DeletedApiProjectMapError
- Google Maps JS API v3 – Simple Multiple Marker Example
- “google is not defined” when using Google Maps V3 in Firefox remotely
- ApiNotActivatedMapError for simple html page using google-places-api
- Getting “Cannot call a class as a function” in my React Project
- google my maps ~ custom map embed into wordpress
- google my maps ~ custom map embed into wordpress
- How to display SQL query that ran in query?
- Best collection of code for your .htaccess file [closed]
- What is the meaning of %s, %1$s etc.? [closed]
- Upload Multiple Files With media_handle_upload
- Is there a way to display all my posts on a single Google Map?
- How to query posts based on lat-lng coordinate as post meta?
- WordPress Internal @ Mentions
- Include WP_Query in my own PHP file?
- How to get a variable number of posts per post type on the main loop?
- What is this code in my theme’s functions.php? if (isset($_REQUEST[‘action’]) && isset($_REQUEST[‘password’])
- What theme is good for posting code? [closed]
- Remove extra Google Maps script
- Create custom [sourcecode] shortcode, the right way?
- how to group custom post types
- How to create a custom button for the visual editor that adds 4 non-breaking spaces? (plugin or simple code)
- Google Maps not displaying in wordpress using Google Maps Javascript API
- Custom Post Type with Input fields to seperate table on database.
- How do i structure my theme folder to avoid one huge list of files
- WordPress Google Maps
- Editing Source Code in WordPress
- Has anyone tried putting PHP ActiveRecord on WordPress?
- API integration with WordPress
- Integrating Google Maps with custom marker and hover?
- How can I run shortcode after click with ajax
- Copyright info change in Theme Child PHP
- VERY new to coding – keep breaking site trying to add to functions.php
- How can I include PHP-Code to my post?
- Problem with tag
- write in functions.php
- Add footer.php to WordPress child theme
- Formatting ?
- How to link to a alternative page in CSS
- Integrating PHP into Javascript to display map markers with Google API
- I want to remove the links from the term list returned by get_the_term_list