esc_url() has a $_context argument which defaults to ‘display’. It will replace & with & unless you change context to something else, e.g. sanitize_url uses ‘db’. (Why it uses & instead of the usual & I don’t understand, but it’s deliberate.)
I’m guessing you’re calling esc_url() somewhere in your code where you should be calling esc_url_raw() or sanitize_url() (which are identical) instead. These will not substitute &s.
Related Posts:
- start_lvl Ignored in Custom walker_nav_menu
- How do I use Shortcodes inside of HTML tags?
- add_filter the_content str_replace after shortcode
- What exactly does “Posts page” do in WordPress?
- Adding a search form inside a div
- Load custom field value into div with AJAX
- Blank on static home page?
- How do I edit the php/html for a particular post?
- How to use SRCSET with get_the_post_thumbnail()?
- How to use a frontend URL with a Plugin
- How do I make wordpress comment fields required?
- How to display blog images using wordpress in existing project
- Javascript code inside “” in core WordPress files .php
- How to display a value from a radio button in the options menu in wordpress
- Custom image upload
- How to display recent posts on home page with custom HTML
- WordPress automatically adds tags when pasting code, how to stop it?
- Slide in Panel WordPress Post
- Upload Image in a WordPress page using PHP
- Removing unneccessary p-tags (Not every p)
- HTML tags in bloginfo description
- My form action url is being prepended with a directory that does not exists
- Where in PHP do I move title and meta (date) to bottom of each blog section?
- Multiple options not staying selected after saving
- Using the echo command adds unwanted br tags to source
- custom fields wordpress
- Why the JavaScript code is ignored from wp editor?
- Populate dropdown with Child Pages based on Parent Page chosen
- How to change redirection route to a php page for making it only accessible by logged-in members?
- How to remove ?wp-mce-4103-20162941
- Why Won’t My Inputs in a form with a Get method work together?
- parts of url disappear when using # inside href=”” [closed]
- How to get the value of input hidden html from text editor to custom page template?
- Dot is not added at the end of href
- Commenting out unwated CSS/scripts in HTML with PHP
- Add .htm extention to a custom taxonomy
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- How do I add a custom css to all posts without affecting homepage css? [closed]
- Noscript not working as it should in wordpress site
- Wrapping a Sidebar within
- HTML escaping data with ajax requests
- Add data-id attribute to child page links
- HTML table attributes ignored
- How to edit HTML of my website on WordPress? [closed]
- How to rename woocommerce-billing-fields
- Prevent redirect to wp-login.php
- How to add post meta in while loop?
- Adding function to child theme’s function.php
- How to use the checked() function to check for a non-empty var
- Calling function in loop causes repeat data
- Find out last 7 days of upload images, last week uploaded image from Gallery and display them in different pages
- Link to page with posts of specific type
- Custom forms with HTML
- Wrap title and excerpt in a div (latest posts block)
- Displaying images outside the content
- how to changes mobile menu toggle breakpoint in WordPress
- PHP inside echo HTML
- WordPress User Meta value variable into Google Gauge Chart
- PHP function for horizontal Woocommerce thumbnails and badges
- What are the advantages/disadvantages of ways to use php template files?
- dynamic php menu with hidden sub-categories only showing when the category name is clicked
- couldnt show short code atts in category
- Add Link to PHP message
- separate list of programs in html/javascript coming from php
- Remove span tags from WooCommerce Downloads page
- Drop down question
- How to enable HTML tags in category description without breaking the category page
- Can’t display anything through homepage text editor
- How can I edit the final HTML structure of the whole web page
- Woocommerce custom attributes list help
- WooCommerce multiple custom fields code
- How to override html codes in wordpress?
- Access certain Entry in HTML-Table and pass the entry-data in WP not working [closed]
- Target a specific container to style on WordPress storefront theme
- How to include different html tags in the header for different pages?
- Create html tree sitemap
- Pass form attributes to another php template in wordpress
- Custom HTML form using PHP – help with ajax/username validation
- Code works on page-example.php by not category-example.php
- How to create a php page to collect information from a html page
- Font-Family does not looks like how it should be [closed]
- Can’t make product images clickable
- I need help implement a Javascript code into the PHP file
- WooCommerce – Print Processing orders [closed]
- Category – “No content found”
- Add options to WordPress backend
- Automatically create a loop for post ID
- WordPress – Image href for home menu nav not working
- What is the best way to get the first few post from WordPress in different divs using a loop?
- Cant get theme to change footer color through theme customizer
- Save Option on Database
- Parse error: syntax error, unexpected ‘}’ in
- Sorting Problem
- Saving meta box data from selected option’s value in database is not working
- Word press – JSPDF – Sending PDF as attachment from wp_mail – Special characters
- How to create different templates for woocommerce single-product.php?
- Endpoint exists and shows up in My Account dashboard. Need to add endpoint to My Account DROPDOWN menu in Porto theme
- How can I change text on my SearchWP search results page, as this is not an editable page in WordPress?
- How can I process a form submission from an HTTP POST request?
- Allow HTML in custom taxonomy description, and show it on front end