wordpress snippets last updated   : October 6, 2014
we now have 641 snippets

Enable Contact form 7 on specified pages only otherwise wp_deregister_script

wordpress snippet

Like many plugins Contact form 7 adds CSS and Javascript to the head of your HTML document. However like many plugins this is done on every single page regardless if the code is required. Adding this snippet to the functions.php of your wordpress theme will let you enable Contact form 7 only on specified pages.

read more

Display wordpress login form anywhere with wp_login_form

wordpress snippet

Depending on how you are using WordPress you may have given users the ability to register to your website. Now all you need is a simple and beautiful way to let them register. This snippet will provide a simple way of adding that login form. Just add the first snippet in the location of your theme you wish to display the login form.

read more

Remove role=”search” in get_search_form()

wordpress snippet

Adding this PHP snippet to the functions.php of your wordpress theme will remove the role=”search” from the get_search_form() HTML output. Please note that role is an attribute introduced in XHTML draft for accessibility however does not validate.

read more