122 posts CoralixThemes
  • Has referred 10+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has been a beta tester for an Envato feature
  • Has collected 1+ items on Envato Market
+5 more
CoralixThemes says

Hi guys,
I need some help! My last work has a problem with Themeforest top bar. For some reason the demo is working fine but when I try to see the preview (which includes Themeforest top bar some scripts stop working). Any idea?
Themeforest item: http://themeforest.net/item/candidate-political-donation-landing/7143739
Demo here: http://candidate.coralixthemes.com/

1242 posts The Last Man Standing
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Had an item featured on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been a beta tester for an Envato feature
+7 more
ImanGM says

Hi,

I guess it’s because some JS codes are not permitted to load when your site is loaded in an iframe from another domain name than your site.

This is why I’ve removed the default ThemeForest top bar on my latest item with one on my own host.

Hope this helps.

Cheers,
Iman

1135 posts
  • Has referred 50+ members
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+5 more
Smartik says
Remove the iframe. Add this in the header of your template.
<script>if ( top !== self ) top.location.replace( self.location.href );</script>
122 posts CoralixThemes
  • Has referred 10+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has been a beta tester for an Envato feature
  • Has collected 1+ items on Envato Market
+5 more
CoralixThemes says

Hi, Thank for your help. I try this with my custom top bar but it didn’t work. :(


Hi,

I guess it’s because some JS codes are not permitted to load when your site is loaded in an iframe from another domain name than your site.

This is why I’ve removed the default ThemeForest top bar on my latest item with one on my own host.

Hope this helps.

Cheers,
Iman
122 posts CoralixThemes
  • Has referred 10+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has been a beta tester for an Envato feature
  • Has collected 1+ items on Envato Market
+5 more
CoralixThemes says

Thank you so much. It works! You save my day :)


Remove the iframe. Add this in the header of your template.
<script>if ( top !== self ) top.location.replace( self.location.href );</script>
by
by
by
by
by
by