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

Remove inline style from gallery shortcode

wordpress snippet

The WordPress gallery shortcode will add some inline CSS to your document however if I’m like many of you, I would rather use my own. Adding the above snippet to the functions.php of your wordpress theme will disable the default gallery styles from being inserted into the page.

read more

Increase the excerpt field height

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will increase height of the excerpt field within your post editing screen.

read more

Remove recent comments wp_head CSS

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove the CSS added to the header for the recent comments widget.

read more

Custom CSS per post

wordpress snippet

Great snippet from digwp.com this will use a specified CSS file based on post ID. Create a new directory within your theme called art-direction then create a new css file for the specified post in this format style-0000.css where 000 is the post ID.

read more

Gallery shortcode remove css

wordpress snippet

Adding this PHP code to your function.php will remove the CSS wordpress adds when using the gallery shortcode.

read more

Prevent cached CSS

wordpress snippet

These are two example to control the caching of CSS for your wordpress theme. The first example appends time() to the end of the file name. The second method simply type ?v=1.0 and change the version number when you update your CSS.

read more