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?
- 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
- This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console
- InvalidValueError: not an instance of HTMLInputElement
- Can not solve: Geocode was not successful for the following reason: OVER_QUERY_LIMIT
- Google Maps JS API v3 – Simple Multiple Marker Example
- google my maps ~ custom map embed into wordpress
- How to get a variable number of posts per post type on the main loop?
- how to group custom post types
- How do i structure my theme folder to avoid one huge list of files
- write in functions.php
- Pinterest Integration Using functions.php
- Successful or Error Message after running mysql code in functions.php
- Beautify WordPress HTML output without any plugins
- Date/time limitation of posts where function must be executed
- Run a Parallel PHP Application with WordPress
- How to get a Google maps SQL->XML->map marker tutorial to work in WordPress
- Connect Second Database to WordPress
- If in category to be inside of a function
- Hide wordpress field if data is empty in post!
- How to display Unicode correctly?
- code suddenly appearing from my tempate second loop
- Latest post in a specific menu
- How to build a site with a map that shows where people offer and need help?
- WordPress change Language not working
- Create a custom taxonomy that will be used to create and filter markers in a Google Map
- How can this crude function be improved?
- Can I do in-page changes binding events/triggers to actions in WordPress?
- How to run wp cli from a wp hook?
- Fatal error: Uncaught Error: Call to undefined function get_header() [closed]
- Allow tags between shortcode in comments
- Author & date removal
- PHP code snippet to remove microdata
- Counting number of posts in multiple (sub)categories using shortcode
- How to get input value after google maps autocomplete?
- Nearby locations using Advanced custom fields, maps?
- remove edit link only for published post and pending post
- How can I use javascript in specific posts without relying on a plugin?
- Post title and url not showing on google map marker [closed]
- How to add specific posts to specific pages in WordPress?
- Code for cron to delete posts that contain specific expression (e.g. “unable to fetch” every 30 minutes
- Website Tablet Check Out Field Issue
- style.min.css code issue
- widget that will do shortcodes that user inputs
- How to add a class name to the ancestor of a post?
- Themes with variable width or single columns? I want to display source code
- Mixed Content: The page at ‘https://www.taylortireauto.com/?s=contacts’ was loaded over HTTPS [closed]
- Creating a press page for our project
- Google map iframe into wordpress theme [closed]
- How to handle multiple distance matrix api request in loop to reduce load and request time?
- How do I upload my WordPress code files from previous website onto local host WordPress website?
- Changes to code not displaying
- How to give specific class name to category in wordpress with code snippets
- Convert Image to Webp on upload without plugin