Title: Remove links form source code header
Last modified: August 20, 2016

---

# Remove links form source code header

 *  [marrot76](https://wordpress.org/support/users/marrot76/)
 * (@marrot76)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/remove-links-form-source-code-header/)
 * 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)

 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/remove-links-form-source-code-header/#post-2184058)
 * 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](https://wordpress.org/support/users/marrot76/)
 * (@marrot76)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/remove-links-form-source-code-header/#post-2184070)
 * 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.

## Tags

 * [header](https://wordpress.org/support/topic-tag/header/)
 * [remove_action](https://wordpress.org/support/topic-tag/remove_action/)
 * [source-code](https://wordpress.org/support/topic-tag/source-code/)

 * 2 replies
 * 2 participants
 * Last reply from: [marrot76](https://wordpress.org/support/users/marrot76/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/remove-links-form-source-code-header/#post-2184070)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
