wordpress snippets last updated   : April 14, 2014
we now have 630 snippets
category page

Display total published words in “Right Now” admin dashboard

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will display the total number of published words from posts and pages. This is displayed at the bottom of the “Right Now” box in your wordpress admin dashboard.

read more

Add parent page slug to body_class

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add the parent page slug to the body_class. Displayed like this <body class=”parent-PAGESLUG”> this can be a great way if you need to style elements on specific pages.

read more

Unlimited number of child pages using wp_list_pages

wordpress snippet

Adding this snippet to the sidebar.php of your wordpress theme will use wp_list_pages to display all child pages regardless of depth. This is something I have not found online and needed for a current theme I’m working on, enjoy!

read more

highlight post_states within admin posts and pages

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will highlight the posts_states within the admin post and page sections.

read more

Remove the comments count column from pages

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove the comments count column from pages admin page.

read more

Get the page ID by the page name

wordpress snippet

Add the first snippet into the functions.php and the second snippet into one of your wordpress template files. This snippet will allow you to return a page ID by the page name. Don’t forget to change PAGE_NAME to the name of the page you would like to return the ID of.

read more
jqsnipp.com | we just launched jquery snippets website