• Resolved Anonymous User 6087458

    (@anonymized-6087458)


    The plugins great in general.

    My only issue is that it adds a css file to the header of pages and I have to remove this as it’s just another external css file interfering with my SEO. It has hardly any content and of course I could just delete it but I want to do it properly and not have to deal with it every time the plugin updates.

    Can this be clarified?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Anonymous User 6087458

    (@anonymized-6087458)

    by the way, I’ve tried this and it didn’t work…

    // Remove specific plugin css!
    function remove_unwanted_css(){
    	wp_dequeue_style('duplicate-post');
    }
    add_action('init','remove_unwanted_css', 100);
    
    
    Plugin Author Enrico Battocchi

    (@lopo)

    Hi,
    you must go under “Settings”->”Duplicate Post”, then tab “Display”, uncheck “Admin bar” and save.

    You’re right, it shouldn’t be added to unlogged visitors or when it’s unused, I’ll try to fix it in the next version.

    Thread Starter Anonymous User 6087458

    (@anonymized-6087458)

    Hi Lopo thanks for the tip that did it for now but yes it would be great if it doesn’t appear when admin bar isn’t present.

    @arkid77 i added this to our theme and it removed it for non-admin users:

    
    if ( !is_admin() && !is_admin_bar_showing() ) {
      remove_action( 'wp_enqueue_scripts', 'duplicate_post_add_css');
    }
    

    i have that code chunk inside a function that runs on

    add_action( 'after_setup_theme …`

    But i agree it would be super nice if Duplicate Post just had its own checks to not output css for not-logged-in users, pretty please.

    Please hurry up with the update… i don′t want to setup 40 WordPress Installations ??

    greets
    M

    Hi, yes, it is very annoying.. please repair this

    Plugin Author Enrico Battocchi

    (@lopo)

    Hi everybody,
    version 3.0.2, rolling out now, should fix the issue.

    Hi Lopo,

    thanks for repair this. Also, this CSS should be not loaded, if I have in functions.php

    show_admin_bar( false );

    But, it is only fo optimalization. Thx ??

    Plugin Author Enrico Battocchi

    (@lopo)

    Hi,
    you’re right, I thought I added a check on the showing of the admin bar but skipped it when I released the version.
    I’ll fix it in the next one.

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How do I stop the css file being added to my header?’ is closed to new replies.