[Resolved] Removing the bloglovin iframe

This topic contains 18 replies, has 2 voices, and was last updated by  Andrew Misplon 9 months, 1 week ago.

  • Author
    Posts
  • #7293

    Tine17
    Participant

    Hi 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
    Tine

    #7296

    Andrew Misplon
    Keymaster

    Hi 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/

    #7297

    Tine17
    Participant

    I was using another plugin to add the code snippets, but I tried using yours and now I am unable to enter my own page…

    #7298

    Tine17
    Participant
    This reply has been marked as private.
    #7299

    Andrew Misplon
    Keymaster

    If you were using another snippets plugin then updating Ultra shouldn’t have any influence on the snippet being present or removed.

    #7300

    Andrew Misplon
    Keymaster

    So 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.

    #7301

    Tine17
    Participant

    I 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

    #7302

    Andrew Misplon
    Keymaster

    Here 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.

    #7303

    Andrew Misplon
    Keymaster

    Thanks 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.

    #7304

    Andrew Misplon
    Keymaster

    So 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.

    #7305

    Andrew Misplon
    Keymaster

    OR if it’s easier for you, go to /wp-content/plugins on your server and delete the code-snippets folder. That’ll put you back to where you started.

    #7306

    Tine17
    Participant

    Ah, 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

    #7307

    Andrew Misplon
    Keymaster

    Nicely 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

    #7308

    Tine17
    Participant

    Well, 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…

    #7309

    Andrew Misplon
    Keymaster

    WordPress 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.

Viewing 15 posts - 1 through 15 (of 19 total)

You must be logged in to reply to this topic.

Scroll to top