How to do animated scroll window to top or offset of particular element

Whenever you want to do animated scroll using a particular html element as a offset you can use the following jQuery code where -100 it the offset from the element in pixels.

Also if you would like to have the option for scrolling to the toп of your page use this one:

Prevent hotlinking on your media files

Whenever you want to ban/prevent hotlinking your media files and protect your server’s resources and bandwidth you may use the following snippet in the .htaccess file of your main directory of your site.

Just replace YOURSITE.YOURDOMAIN with your site and at the fourth row of the actual code (don’t mind the # comment line) […]

Registring widget area and how to use it later

To register a widget area for you theme you should  use the register_sidebar function in your theme’s function.php.

This function will register the widget’s area through the ‘widgets_init’ hook. For more specification on register_sidebar please see here. Next step is to set the place where we want to see the widgets to be displayed. […]