• Hi there,

    I try to remove all links from the source code header (link to external .css and to some Javascript files. I tried with creating a function like this –

    <?php
    
    // Clean up the <head>
    
    function removeHeadLinks()
    {
    	remove_action('wp_head', 'rsd_link');
    	remove_action('wp_head', 'wlwmanifest_link');
    	remove_action('wp_head', 'wp_generator');
    	remove_action('wp_head', 'rel_link');
    }
    add_action('init', 'removeHeadLinks');
    
    ?>

    – but it′s not working. Can s.o. help me? Otherwise i don′t get the idea of copying wordpress in a crypted folder on the server out of security reasons when you can see the name of that crypted folder in the source code …

Viewing 2 replies - 1 through 2 (of 2 total)
  • The function wrapper is unnecessary complexity. Just use put the remove_action lines in your theme’s functions.php and don’t use the function part at all.

    What ‘crypted’ folder? Have I missed something?

    Also, it is really easy to figure out that you are looking at a WordPress install– just look at the URL(s) for the stylesheet(s) and the javascript.

    Thread Starter marrot76

    (@marrot76)

    Thanks,

    gonna try it out…

    There are some advice around not to copy the content of the wordpress folder directly in the root directory of your server but to save it in a separate folder you should name as weird as possible. So any bots scanning the site won′t be able to find the wp_files.

    That′s what I meant with “crypted” folder…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove links form source code header’ is closed to new replies.