The problem is that you are using the_excerpt()
. This function prints out the excerpt immediately, it doesn’t return a string.
From the core:
/**
* Display the post excerpt.
*
* @since 0.71
*/
function the_excerpt() {
/**
* Filters the displayed post excerpt.
*
* @since 0.71
*
* @see get_the_excerpt()
*
* @param string $post_excerpt The post excerpt.
*/
echo apply_filters( 'the_excerpt', get_the_excerpt() );
}
So you need to circumvent the echo
by using apply_filters( 'the_excerpt', get_the_excerpt() )
instead of the_excerpt()
, then you get the string you need, and the iframes should be where they belong.
Related Posts:
- Making an iframe responsive
- Responsive iframe with max width and height
- Iframe’s overflow problem
- How to Add Custom CSS to the Media Thickbox?
- How to display javascript banner in website header?
- React.js inline style best practices [closed]
- What is a user agent stylesheet?
- Gradient borders
- Applying Comic Sans Ms font style
- Chrome give error **Failed to load resource: net::ERR_NAME_NOT_RESOLVED** while other browser load images
- Responsive Bootstrap Jumbotron Background Image
- How to change an input button image using CSS
- How to apply multiple transforms in CSS?
- Is it possible to center an inline-block element and if so, how?
- Need to make a clickable button
- CSS: background image on background color
- Set line height in Html
to make the html looks like a office word when
has different font sizes
- How to select label for=”XYZ” in CSS?
- margin: auto is not centering
- wp_head() gives me some weird CSS
- How to Handle CSS Organization
- Style new block-editor alignfull class without scrollbars or overflow
- Changing title to lowercase [closed]
- how to make stylesheet appear in theme editor?
- Remove sticky behavior from top navigation on twenty fourteen theme?
- Include CSS with PHP without including wp-load?
- Loading different stylesheet on WordPress pages?
- Redoing home page but changes not taking effect
- How to create a custom CSS class for a specific page template?
- Gallery CSS Problem
- Older isotope portfolio rows shifting downward by 1 pixel on hover
- Shrink Header Image on Scroll
- Correct way to output styles gathered from theme or plugin settings?
- Remove extra white space bellow and above product short description in storefront woocommerce
- Inline Style attribute getting stripped off
- What does generate .less file? [closed]
- Can’t Display Table Headers in Responsive table layout
- Edit css for search results page
- Archive pages have smaller font then the rest of my website [closed]
- Style WP_Debug?
- How can I get the search form to be selected automatically?
- Using transient for dynamic css , how to name it?
- Is there a way to add additional CSS styles to the styles css file dynamically?
- Is it safe to use WordPress generated classes?
- Search Bar in Thesis WordPress Site
- Unstable handling of CSS under WordPress/Elementor
- Add core style in theme
- How to sync the style in the visual editor with the style of a child theme?
- get_template_directory_uri() generates wrong path
- How to change the settings of a video? [closed]
- Change text color dynamically in WordPress [closed]
- Add Custom Alignment Option to WordPress Blocks/Gutenberg
- Custom css author role
- calling an additional css and js links for a custom page template
- Styling last item in ul [closed]
- Remove custom css made by the custom theme
- Font styling in embedded Twitter feed
- WordPress backend is loading as a list
- Embed widget from external source (Zendesk)
- Loading a stylesheet conditionally & verifying CSS
- Dequeue styles with query doesn’t work
- Dynamically populated scss values or how to change styles by user choice
- Save custom option in CSS file
- broken internal JavaScript and CSS files
- avada woocommerce product details in grid
- WordPress login using a completely custom page and no plugins?
- Modifications on css file are not visible
- How to display image on WordPress homepage
- Trying to hide the contact form on a particular page
- Default Gutenberg CSS on frontend
- Hide BBPress create topic on one page
- Dropdown contents hidden behind content [closed]
- How to adjust text’s width and put it at center of post (Visual) editor?
- different theme output for desktop and mobile
- Font size decreases when child theme is created from parent theme?
- Enqueue CSS and Script only if needeed
- resize chat bar on mobile [closed]
- Menu reduce space between words
- add css to only body text
- Improving the readibility of bright text on a bright background [closed]
- Trying to remove white space between nav bar and content?
- Colouring the text on the video
- Specific text not affected by CSS style [closed]
- Import HTML code that loads css and javascript into specific page
- checkbox function not working for dropdown menu
- How to change hover color on bulk-action-selector-top and bottom on wordpress admin?
- modify stylesheet of a particular page inside wp-admin
- Bootstrap 4 Optimization
- How to change wordpress registration form submit button value?
- Move main menu to top of screen
- How to remove post view count
- WordPress toolset css struggle
- site-description css is overriden [closed]
- How can I use Advanced Custom Field Option page in CSS WordPress
- How do I make my block-editor styles match my front-end styles?
- Dequeue classic-themes.min.css
- How can I add a section with a different background color?
- “Plate” theme broken after update
- Busting Browser Cache when updating stylesheet of WordPress website
- adjust posts size into columns wordpress