Articles of iframe

Allow iframes from specific sites?

With kses filtering, WordPress only allows a subset of html tags within a post or page, and one of the tags it strips out is the <iframe> tag (for many good reasons). I’d like to allow editors to include iframes where the src is from one of our other subdomains, or from a specified whitelist […]

the_content(); erroneously closing off previous opening before it

I have a custom loop that is displaying a “most popular” posts section. It first creates a linked container (<a href=”<?php the_permalink(); ?>”> … </a>), and then stores data from the current post in the loop within that container. If the post has a thumbnail, it displays the image (if ( has_post_thumbnail() ) { the_post_thumbnail(); […]

Can Username and Password be passed to WP Login page in an IFrame?

I am using a real estate commercial theme, that uses a custom login/registration from on the frontend. The admin panel and option pages are restricted to Administrators, but if the theme is deactivated, non-Admins can visit the admin panel and see the setup options for listing authors. When the theme is active, Authors only see […]

My redirect URL doesn't show any pages on my website

I recently started using WordPress. To do so I installed wordpress on my FTP server. Everything is working perfectly fine so far, except for my page URL. My FTP server’s URL is really complicated so I bought an domain name and redirected it to the FTP server. The site is called . However, because […]

The_content and Preg_replace in loaded Iframe

The Problem: I try delete the tag generates by a iframe after is loaded. The iframe is for load a video but then it loads some tags like this <div role=”contentinfo” class=”dmp_VideoInfo dmp_is-hidden” aria-hidden=”true”> the which I need delete Explain the iframe process I’ve inserted this frame in my post: <iframe width=”480″ height=”270″ frameborder=”0″ src=”//;logo=0&amp;related=0&amp;social=0″ […]

WordPress Template Part in iFrame

(As a preface, I know this is going to sound absurd, but please bear with me. I’m aware this is unideal and atypical.) What I need to do is put wp_nav_menu inside an iFrame so I can view it on a non-WordPress-powered site. (Essentially, I have a WP-powered site where the user will have to […]

Set 3 iframes in a row

SCENARIO: I inherited a WordPress site that uses the Thesis theme. I have Content Blocks installed, which I use to populate the right sidebar. I have a function that randomly picks up three post excerpts in the Books category. The excerpts contain iframes to book listings from View on PROBLEM: The posts are […]

How to add editor-style.css styling to wp_editor on front end for comments

How can I apply my own css (to match editor-style.css) to wp_editor being used on the front end for comments? Currently I’m using code from here to enable the visual editor for comments. My actual code in functions.php: add_filter( ‘comment_form_defaults’, ‘custom_comment_form_defaults’ ); function custom_comment_form_defaults( $args ) { if ( is_user_logged_in() ) { $mce_plugins = ‘inlinepopups, […]

WordPress kills an iframe's apostrophes

I’m using an iframe to let multiple sites embed one interactive element. On the iframe’s actual page it works fine, and it looks fine on another website I embedded it. But when I embed it in a WordPress blog, all my apostrophes show up as squares. I tried removing all smart quotes and apostrophes with […]

Does get_the_content_feed strip invalid tags?

My WordPress 4.2.2 generates a post feed with this <content:encoded><![CDATA[ <p> …some html here… <iframe style=”border: 1px solid #CCC; border-width: 1px; margin-bottom: 5px; max-width: 100%;” src=”//an_external_url” width=”425″ height=”355″ frameborder=”0″ marginwidth=”0″ marginheight=”0″ scrolling=”no” allowfullscreen=”allowfullscreen”> </iframe> </p> ]]></content:encoded> but when I validate this feed with, it throws an error: line xx, column 0: content:encoded should not […]