WordPress Code to Break Out of Bloglovin’ RSS feed Frame and get more Unique Visitors Instantly

Awesome Fashionable Workspace

As I’ve recently discovered populair RSS feed readerĀ Bloglovin’ can cause your monthly pageviews to drop enormously. Although blogging shouldn’t be about desperately trying to reach a certain amount of visitors keeping track of your pageviews and visitors (with Google Analytics) can be important for the continuing growth of your blog…

Lots of media agencies, brands and advertisers look for a certain amount of pageviews before collaborating and such collaborations can take your blog to the next step! Especially for small blogs likes mine this small adjustment might give your blog the extra nudge it needs and might open the way to new possibilities!

I always found it strange how little referals I got from Bloglovin’ although almost 400 people followed my blog and more than 400 people followed me personally. I mean, I know that these numbers aren’t exactly booming but 15 Bloglovin’ referals a month… seriously? What confused me even more was that I noticed an increase of people saving my posts (aka, liking my posts) without the referals going up.

After reading soms blogposts on this matter I found out Bloglovin’ actually keeps your pageviews by containing your blogpost in their RSS frame. Ofcourse this is something we would want to avoid at all costs! Thankfully this isn’t that dificult but it did take me some time to figure it all out. After some intial failed tries I came across this awesome website which provides you with this code to break out of RSS frames (including Bloglovin’s frame). Simply copy-paste this in your functions.php and Bloglovin’ will no longer steal your pageviews!

// Break Out of Frames for WordPress
function break_out_of_frames() {
	if (!is_preview()) {
		echo "\n<script type=\"text/javascript\">";
		echo "\n<!--";
		echo "\nif (parent.frames.length > 0) { parent.location.href = location.href; }";
		echo "\n-->";
		echo "\n</script>\n\n";
add_action('wp_head', 'break_out_of_frames');

It really made a difference in my case and my Bloglovin’ referrals are now up to 65 and I’ve only installed the code recently. I tried other methods before but they somehow didn’t work for me… for instance they kept my photos from showing up the the Bloglovin’ posts even though I did set a featured photo etc etc. To me this seems to be the easiest option by far as you only have to copy-paste a code into your functions.php and you’re done for all future posts!

Hopefully this was helpfull to you all!



Keep in touch via Facebook, Instagram, Twitter, Pinterest & YouTube <3

insta YouTube Facebook Newsletter

  • I tried a lot of codes, but they didn’t work for my blog. This one however does work! Thanks a lot for this post! :-)

  • I’m so glad I found your post! The code works beautifully! Thank you :)

  • What does it exactly do?Does it remove the Bloglovin header when you are clicking through your bloglovin blogs?

  • I tested out your blog on Bloglovin, but it still shows the Bloglovin header when I click on your posts for me..Do you still have the code embedded? Maybe you had this in your code prior and changed your layout? I just added it to my code, and the bar shows up for a few seconds and then goes away and refreshes the page.

  • Perfect, thank you so much!