fix npm permissions

After installing nodejs, we need to install npm packages to include module likes async, request, etc. We need to fix npm permissions for a current so he can have permissions to write to directories that npm will use to store global packages. You will get this permission error while installing npm packages globally without ‘sudo’. npm ERR! Error: EACCES, ….… Continue reading fix npm permissions

Youtube share video – remove title and controls

Usually we share youtube videos using iframe in website, sometime we do not need default controls and title, its very easy to remove them. Just pass following “get” parameters to youtube url. showinfo=0&controls=0 ex.

WordPress custom post type endpoint

Requirement: If you want to add endpoint, let say “books” to  CPT author, and wants to change view in template. Solutions: No need to use “add_rewrite_endpoint” function because as of today, we can not add endpoint to CPT only ( we can add endpoints to either page or archives or all links, etc using  add_rewrite_endpoint function )… Continue reading WordPress custom post type endpoint