I’m not sure why there’s a non-breaking space being added to the front of your excerpt. It would be best to find out what is putting that there. But in the meantime, you can add this to your theme functions.php ( or a simple plugin ) and it should take care of it.
//* Remove non-breaking space from beginning of paragraph
add_filter( 'the_excerpt', function( $excerpt ) {
return str_replace( [ '<p> ', '<p> ' ], '<p>', $excerpt );
}, 999, 1 );
Related Posts:
- Need help removing […] after excerpt
- Remove post image caption from post_excerpt();
- add_filter the_content str_replace after shortcode
- WordPress Ajax always returns a 404 error
- Limit the Excerpt field in WP-Admin in words
- How to use SRCSET with get_the_post_thumbnail()?
- How do I make wordpress comment fields required?
- WordPress Wysiwyg Content not being displayed
- Javascript code inside “” in core WordPress files .php
- How to change / delete product short description in Woocommerce
- How do I add HTML to a PHP function [closed]
- Removing unneccessary p-tags (Not every p)
- WordPress automatically adding html tag around PHP code
- Missing sidebar parameter “fix” – before_content
- How to get the POST TITLE using the POST ID?
- Load a page into a div with Ajax
- Converting HTML Template to WordPress Theme
- Multiple options not staying selected after saving
- How to put “Read more” link in Custom Excerpt inside p tag?
- Error when adding excerpt to the content through functions.php
- How to remove ?wp-mce-4103-20162941
- parts of url disappear when using # inside href=”” [closed]
- HTML tags not showing in excerpt
- Dot is not added at the end of href
- 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]
- My custom get_the_excerpt() can’t get excerpt by ID
- Using the_excerpt() on a page
- 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]
- WordPress wp-admin redirect and exception
- 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
- Link to page with posts of specific type
- Post class only applying to first excerpt; why?
- Function Display article [closed]
- Assign Custom classes to every Excerpt
- How to get the second slug of a page url?
- Displaying images outside the content
- custom add note meta box with add button in wordpress
- WordPress User Meta value variable into Google Gauge Chart
- List sub categories and corresponding posts of a parent category
- population category dropdown and sub category onselect
- PHP function for horizontal Woocommerce thumbnails and badges
- Using Google Analytics in an enqueued JS file
- 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
- Drop down question
- How do I disable cache for a certain page?
- How can I edit the final HTML structure of the whole web page
- Install functionality for push notifications but WP-Theme has oddly-named, hidden source files [closed]
- AJAX and custom pages
- how to add functions to my function.php using a child theme?
- How can I create a shortcode from an html and php code written together
- Cannot figure out how to add a read more link to a manual excerpt. Please help
- Changable favicon
- WooCommerce multiple custom fields code
- How to override html codes in wordpress?
- Allowing HTML elements in title widgets spacing problem
- 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
- wordpress form action page not found
- Pass form attributes to another php template in wordpress
- Custom HTML form using PHP – help with ajax/username validation
- How to create a php page to collect information from a html page
- How do you change the tag font size in the repeater-template.php [closed]
- Font-Family does not looks like how it should be [closed]
- Add point on excerpt post
- 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 extra markup to WP menus
- 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?
- Run php function after html click after page refresh
- Get all the contents of taxonomy and sort by term
- Gallery requires a featured image but does not show it in posts/pages
- How to style this wp_list_pages markup
- How To: Simple domPDF Example
- Cant get theme to change footer color through theme customizer
- How do I modify the with wp_nav_menu()
- I can’t seem to get excerpts showing inside get_pages and don’t know why?
- Can you not edit the HTML and PHP of your WordPress without paying?
- Parse error: syntax error, unexpected ‘}’ in
- Add multiple HTML attributes to an Elementor button
- 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