Mark was correct that it was some other code causing the issue. I tracked it down to a plugin I use during testing: Insert PHP; https://wordpress.org/plugins/insert-php/
There’s a line in the plugin’s code that’s replacing forward slashes.
Anyhow, I ran the same code I was trying yesterday via a shortcode, and everything works as expected.
Related Posts:
- Backup the Database and Restore from the Backup?
- Scaling a WP eCommerce site
- Looking for a lightweight theme using WP3 new tags and features (not 2010) [closed]
- Limit Media Library to Given Folder
- How can I get posts in a subcategory to display on it’s parent categories archive page?
- Creating my own Admin Forms in a WordPress CMS?
- Custom taxonomy: same terms, but for different years
- customize_register with Multiple controls/settings – how to get values?
- Best practices for A/B testing?
- Editing the Number at the end of Page URLs / Editing Page Slugs
- Integrating the WordPress admin panel with a frontend theme
- simple wp_insert_post example
- Redirect members to custom page upon logging in through WP admin
- Can I use $wpdb for my custom tables in the WordPress database?
- Integrating MailChimp newsletters as post
- What is WordPress file encoding?
- WP_Query with the “offset” argument
- Adding “Interesting Tags” & “Ignored Tags” like StackOverflow.com in a WordPress Blog?
- Auto add taxonomy if post has category
- Add a containing DIV to core Gutenberg blocks
- How to Remove Subscribers from the Post Author Drop Down
- Allow comments without approval for custom content type
- Are there any security issues with setting the WP_INSTALLING constant to true?
- How to add classes in the wp_list_category parent link
- WordPress generated links – menus and home_url() – not using https despite settings
- Search a post using the date it was posted
- How to use
- Name/Word Replacement Plugin
- Get page ID outside the loop, matching menu ID
- Author Tracking Code!
- Is it possible to make widget return only data (eg, array)?
- Viewing checkout page removes fees from mini cart
- help to change some colors (woocomerce and store locator) [closed]
- Show Featured Post Only On The Homepage
- How can I create a second multisite network in a subdirectory?
- How do i remove animated icon [closed]
- order event posts by multiple custom fields
- Custom Role with Own Page Edit Capability
- Multi-site User Sessions
- Looking replicate static HTML Menu into WordPress Dynamic Menu [closed]
- CSS Styling a specific page
- How can I start over on my site? [closed]
- Plugin to allow registered users to customize their layout [closed]
- Custom Columns WordPress Admin
- Save Textarea on WordPress Frontend
- How to custom post navigation
- Showing different pages depending on a cookie value
- WP function duplicating body content
- Customizing Comments
- Custom section (e.g. Demos or Downloads)
- WooCommer Product Category Loop – How to change the display order of the rating and price?
- More Fields: Input “Values (if applicable)” is disabled
- Replace TimThumb in existing WordPress Themes
- Moved wp-content and got problem with themes directory?
- How do I make Dynamic Student Admission Form?
- WordPress search on a custom table
- How to get the full product name by ignoring custom modification on it
- Is it possible to edit a wordpress category with Gutenberg?
- Moving Quantity after product description
- Twenty Twenty edit “Read more” text
- Some questions about best practices for custom code
- I want to change url structure of my created archieve pages
- Simple Add To Cart Ajax Button
- How to prepend block content in getSaveElement filter?
- Advice on how to structure a custom plugin
- How can I delete the word `Category:` from page titles? [duplicate]
- How can I add category variable inside posts?
- Create page when a new site in multisite network is created?
- Figuring out how to create “Option Pages” in WordPress admin
- Including a Customized Initialize File with a wordpress header
- Replace Vimeo and Youtube in from scratch theme with from-the-group-up single post template?
- How do I display custom RSS fields on my site?
- How do I change the content of an element for a theme without losing the styling?
- Change the – WordPress from titlebar?
- I can’t override CSS
- How to Remove wpautop in woocommerce includes folder class-wc-order-item.php
- How to replace specific word in wordpress without losing their functionality
- Url rewriting on custom post with CPT UI plugin
- permalink of word press in htacess
- Show comments based on user role in front end
- let users add multiple divs in static page
- How do I map two domains to the same wordpress installation?
- Redirect Every Instance of The Author Template Pages to Custom Author Pages
- Best way to replace image url with source
- Where should I put this custom data?
- Multiple Taxonomies Using Custom SQL Query
- Changing starting number of User ID
- how to register / add multiple options into one field in wordpress?
- Custom WP deactivate an email activation link sent to user’s email.
- How to duplicate “Pages” section in the control panel?
- WordPress Customize panel – accessing the values
- Page template with custom html fields inside a content
- Pull certain WordPress posts on custom CMS instead and 301 wordpress to it?
- Create users via PHP
- Show post content in two different places without redirect
- Multiple Customizers
- how do i add logo in my site
- Show total sales for each products on search results page Woocommerce
- Custom Search on media files PDF images pages posts
- Permalink Listing WordPress