Assuming that $_product->details
contains what can be referred to as post content, and contains HTML, and you want to have that HTML rendered by the browser then you’re doing it wrong.
Please refer to the esc_html
function and play around with it in a sandbox – you will soon find out that what the function does (just like the Codex says) is it escapes the HTML, i.e. transforms any special symbols to HTML entities, so these symbols are rendered as symbols and are not interpreted by your browser.
echo esc_html('<b>a string</b>'); // Produces <b>a string</b>
echo '<b>a string</b>'; // Produces <b>a string</b>
So the short answer to your problem appears to be – remove the esc_html
function from around the output.
Related Posts:
- How to add a data attribute to a WordPress menu item
- Order posts (across the whole site) by metadata date
- Functions.php code that only runs on localhost?
- hook a functions to change wp-config from functions.php
- Relative URLs and hide /wp-content/themes/
- Disable visual editor on one specific page
- How to display random users with avatars
- Can the wp-plugins (Must Use Plugins) URL be targeted for use in functions.php?
- In a WordPress plugin, how do you output HTML code inside the DOM header? [closed]
- Slugs as breadcrumbs for Pages
- Different ‘WP_CONTENT_URL’ for different subsites in Multisite setup?
- Removing Unnecessary Text from Admin Menu without CSS
- Display WordPress Search
- Remove_filter (‘the_content’, ‘wpautop’) is not working
- Preferred Use of home_url()?
- Where does function_exists() look to decide whether a function exists? [closed]
- Get page slug and assign a variable within functions.php
- Clean-up script tags
- Make “sidebar template” the default template for new pages
- Refactor create_function
- WordPress function for 1 to for many
- Logic to Print/echo a css class only for 1st post and ignore all post after 1st? [closed]
- Attach parent category template to all subcategories
- How to insert a text in all pages and posts before or after specific places?
- How can you limit srcset on a single type of page?
- Remove Font-Awesome MaxCDN Link & Load Locally
- How to remove howdy dropdown menu content
- Change Admin Bar “Visit Site” URL
- exclude a category from a search on a specific page
- How to fix Warning: call_user_func_array()?
- Stop turning small dashes into longer ones
- How to get specified parent page title in my function
- Execute function after a post has been published
- Last updated date function
- Possible to display shortcode based on the category?
- I want to get product attirbute in the section below
- is_customize_preview() like function to check if Customizer “Live Preview” in JavaScript
- How to set default archive image without overriding first attached image? [closed]
- Restore Image Title Text
- Passing a variable via wp_head and then calling it on the page
- Load Woocommerce and WordPress Functions Outside
- How to make custom column Admin>Users sortable?
- How to know which ajax file or function is called for action
- Full page template function
- Redirect from “private” page and functions.php which tag add to add_action()?
- Display gallery on bottom after content
- watermarking gallery items
- WordPress Shortcode function display outside of widget
- Get rid of the widget Item Class=”widget-item”
- Storing password (functions.php)
- Check if the image size is available and if not use ‘full’ image size
- Change menu based on page template via functions.php
- wp_enqueue_script | Help me figure out what is causing jQuery is not defined
- Why is it so hard to add a class to the tag in the sidebar widget?
- Parent theme styles overriding child theme CSS [closed]
- Adding theme option values as custom body class
- How to add a new image size and apply it to posts only?
- What is the correct way to include my new functions and scripts in WordPress?
- Display a random tag but using cron to control frequency of change
- How Do I include/Import a Custom Widget from the Parent theme into My Child Theme?
- Perform function on publish AND save (not just save)
- add_menu_page() with variable function
- include w_thumbnail_src in function?
- Multiple, Dynamic, Sidebars Problem – First Sidebar not working properly
- Problem with shortcode inside a shortcode
- Hide Author By-Line if After Certain Date
- Can I use ‘Featured Image’ as a hero image and a thumbnail?
- How to Override Page Template if URL matches query?
- wp_title() return random number
- Woocommerce Display Discount On cart
- How to offset main query without affecting other queries and backend
- ACF Date Form in Custom Admin Field
- How to add link rel tags on paginated posts?
- How to pass data from a plugin to functions.php
- Function to disable “href” anchor tags that contain “a data-name” on mobile only
- Execute jQuery with custom event listener after successfully add an item to the cart
- WordPress hooks to call a function inside a construct
- WordPress undefined function error on using add_action() in functions.php
- How to create admin ajax function for my contact form
- how to display featured image for single post for a specific category
- Database Query not working
- Load a Child Theme’s style.css just before the closing tag
- Can’t wrap my head around this function – any help would be appreciated
- Figure inlined width trigger distorted layout
- save_post hook – headers already sent?
- Exclude javascript in certain page url and all following url’s after forward slash
- How to use WP_rewrite?
- Wp get archive only text not link
- can not call functions in function.php
- Shortcode Variations?
- How to test for a class (from a plugin) in functions.php
- Child Theme not working – CSS gone
- Custom shortcode not being included in content paragraph [duplicate]
- Display post_meta-by_key on product catalogue
- What are the parameters are used in add_action and filters?
- Which template file to edit to edit homepage in Mystile [closed]
- Does functions.php apply to every page?
- Different ads on every website on multisite environment
- WordPress Custom wp mail template return full template
- How to get variable from other function inside class function using add_action for Ajax call