wordpress

According to Google SEO if the static files of your website have query strings in the end they cannot be cached by proxy servers. That is why it would give you a lower grade through the Google Page Speed Insights Page. Well, adding the query strings is a way of solving the problem of caching when you make changes to your static files. E.g. if you change one parameter in your css file and then you keep the same name, the browser of the user will continue using the old version which is already cached. If there is a query string which is dynamically created every time you change the file then it appears to the browser that it is a different file so it downloads it again.

As a workaround there are other ways to create a dynamic filename which I will explain in another article of mine in the future.

I you don’t change regularly your static files here is how to remove the query strings from your wordpress installation. Just insert this in your functions.php file of your theme.

If you want to disable the attachment, search, author and archive pages in wordpress just use this code in your functions.php file of your theme. You may redirect the traffic in any way that you want. Here the users are redirected to the home page of the website (you may uncomment the line about 404 to redirect them to the 404 page).

You may insert the following code in your function.php file of your theme in order to change the image of the login screen of your installation. Just upload the image of your choice and change the path and the name of the file in the code provided.

You may add this code in your functions.php file in order to remove links from the admin bar of your wordpress installation according to the id of the current user. Here we check whether the id of the current user is 4.

If you want to remove menu items from the left hand side of your wordpress admin menu by checking the users’s id, here is the php code that you can add in your functions.php of your theme. Just change the $restricted array which is self explanatory according to your needs. There are additional plugin names here that you might not have in your installation, so you can remove them.