- This topic has 18 replies, 2 voices, and was last updated 7 years, 1 month ago by
Andrew Misplon.
- AuthorPosts
- July 14, 2017 at 11:18 am #7293
Tine17ParticipantHi there
First of all I am really happy about the ultra theme. A while back I used this code
// Break Out of Frames for WordPress
function break_out_of_frames() {
if (!is_preview()) {
echo “\n\n\n”;
}
}
add_action(‘wp_head’, ‘break_out_of_frames’);to remove the iframe at bloglovin.com and actually make sure that I recieved the traffic I produced, but then it stopped working after you made an update of the theme. What can I do to get the iframe removal function back again?
Thanks
TineJuly 15, 2017 at 8:19 am #7296
Andrew MisplonKeymasterHi Tine
Glad to hear you’re enjoying Ultra 🙂
All themes completely overwrite their theme files during updates so if you added that function to a theme file it will be overwritten every time you run a theme update.
Try adding the function using Code Snippets: https://wordpress.org/plugins/code-snippets/
July 15, 2017 at 9:04 am #7297
Tine17ParticipantI was using another plugin to add the code snippets, but I tried using yours and now I am unable to enter my own page…
July 15, 2017 at 9:05 am #7298
Tine17ParticipantThis reply has been marked as private.July 15, 2017 at 9:11 am #7299
Andrew MisplonKeymasterIf you were using another snippets plugin then updating Ultra shouldn’t have any influence on the snippet being present or removed.
July 15, 2017 at 9:13 am #7300
Andrew MisplonKeymasterSo one option now is to just delete Code Snippets. Go to
/wp-content/plugins/
on your server and delete the plugin.There is a Code Snippets recovery mode, I’m looking for it now, you can also try Googling it if you want. It’s a variable you insert into your
wp-config.php
file.July 15, 2017 at 9:16 am #7301
Tine17ParticipantI am unable to go to /wp-content/plugins – all I get is a white screen and I am also unable to go to /wp-config
July 15, 2017 at 9:17 am #7302
Andrew MisplonKeymasterHere we go:
define( 'CODE_SNIPPETS_SAFE_MODE', true );
Insert that into your
wp-config.php
file which is located in your WordPress root directory on your server. Insert this line right after:define( 'WP_DEBUG', false );
That’ll let you back in so you can go and inspect what the issue is with your snippet. You should ideally also only run this snippet on the front end. When you save the snippet you can choose to run the snippet on the site front end only.
July 15, 2017 at 9:18 am #7303
Andrew MisplonKeymasterThanks for your reply. Please, keep private replies for sending passwords etc. Thanks.
/wp-content/plugins
is a location on your server. You’ll need to use a hosting file manager or FTP program to access.July 15, 2017 at 9:21 am #7304
Andrew MisplonKeymasterSo step one: access your server via FTP or hosting file manager. Step two: download wp-config.php to your desktop. Step three: edit that file and insert:
define( 'CODE_SNIPPETS_SAFE_MODE', true );
just below this constant:
define( 'WP_DEBUG', false );
You’ll now have access. Then, you need to go and edit your function, there is an error that’s causing WP to fail.
July 15, 2017 at 9:26 am #7305
Andrew MisplonKeymasterOR if it’s easier for you, go to
/wp-content/plugins
on your server and delete thecode-snippets
folder. That’ll put you back to where you started.July 15, 2017 at 9:41 am #7306
Tine17ParticipantAh, I didn’t think of accessing my server. That helped, but I am still unable to remove the bloglovin iframe and I would prefer to get the traffic and not giving it to bloglovin
July 15, 2017 at 9:43 am #7307
Andrew MisplonKeymasterNicely done.
Are there other solutions? I don’t have any experience with this but perhaps? http://www.permanentprocrastination.com/2015/06/remove-frame-from-bloglovin.html
July 15, 2017 at 9:51 am #7308
Tine17ParticipantWell, that will only remove the frame when I read any blogs from bloglovin. I would like to make some sort of redirection to my blog so it will happened automatical for those who click on my bloglovin feed. I have used the snip mentioned in the beginning, but a few updates ago it stopped working. Have you made anything that blocks for that kind of snip?
My theme says markups are not allowed…
July 15, 2017 at 9:56 am #7309
Andrew MisplonKeymasterWordPress themes don’t usually delve into those areas, blocking functions etc. It’s very easy to test theme involvement, go to
Appearance > Themes
and switch to a default WordPress theme, does the issue persist? Recent updates to Ultra have all been minor. - AuthorPosts
You must be logged in to reply to this topic.