javascript - if my site is in an iframe I don't want the header to show in any pages -


Also click on the link My website appears to be the header, I do not want the header to be shown in any pages, if it is in IFrame.

Now my code is

  function no_header_iframe () {? & Gt; & Lt; Script type = "text / javascript" & gt; Function iniframe () {try {return window.self! == window.top; } Hold (e) {return true; }} If (IIFRM) is {$ ('NAV') Ad Class ('hidden'). Hide (); } & Lt; / Script & gt; & Lt ;? Php} add_action ('wp_footer', 'no_header_iframe');  

Because my site is in WordPress.

How do I hide the header in all pages? (If the site is full of IFrame, definitely)

As g_incomputing has said, You will need to include the JavaScript code on each page (and run).

If you have an index.php page that is included for all your website's content, then you can include the code there. If not, you have to include it on every page.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -