Remove p tag from around images in the_content
Adding this snippet to the functions.php of your wordpress theme will remove the HTML p tag from around images in the_content.
read moreAdd a custom class to wp_get_attachment_link
Adding this snippet to the functions.php of your wordpress theme will add a custom class to wp_get_attachment_link.
read moreDisplay wp_list_pages with dynamicly created exclude list
Adding the first snippet to the functions.php of your wordpress theme will use wp_list_pages but filter out any pages that contain no content creating an excluded_pages array. Then add the second snippet into your wordpress theme in the location you wish to display the pages.
read morethis months featured snippets
Custom column with currently active page template
Adding this snippet to the functions.php of your wordpress theme will add a column to your admin pages showing which wordpress page template currently in use.
read moreDisplay total published words in “Right Now” admin dashboard
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 moreAdd parent page slug to body_class
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 moreUnlimited number of child pages using wp_list_pages
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 morehighlight post_states within admin posts and pages
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













