14 Very Useful WordPress Snippets

The popularity of wordpress over the internet motivated numerous web designers and developers to create different types of useful snippets for wordpress users. These wordpress snippets enhance the functionality of your theme/blog yet save your time in developing it. We already published 30 Extremely Useful WordPress Code Snippets & Hacks in our previous post, so here’s another set of Useful Snippets For your next WordPress project.

You may also want to read the related articles below.

1. Change default ‘Enter Title Here’ for custom post types

Adding this snippet to the functions.php of your wordpress theme will let you change default ‘Enter Title Here’ for custom post types. You will need to update the POST_TYPE name and default text

Source: WPSnipp

2. How to disable RSS feeds on your WordPress blog

Paste the code below into your functions.php file. This little function will prevent your content from stealing via rss feed.

Source: digwp

3. Filter to remove image dimension attributes

Paste the code below into your functions.php file. This is very useful in responsive websites.

Source: wordpress.stackexchange.com

4. Highlight keywords in search results within the_excerpt and the_title

Paste the code below into your functions.php file.

Source: WPSnipp

5. Display custom taxonomy tags outside the loop

Insert this in your template file OUTSIDE the loop.

Source: WP-Snippets

6. Display Post Thumbnails in Feed Content

Paste the code below into your functions.php file.

Source: digwp

7. “Nofollow” for External Links in Post Content

Paste the code below into your functions.php file.

Source: OneExtraPixel

8. Add class to links generated by next_posts_link and previous_posts_link

Paste the code below into your functions.php file.

Source: CSS-Tricks

9. Remove Paragraph Tags From Around Images

Paste the code below into your functions.php file.

Source: CSS-Tricks

10. Add A Favicon Using A WordPress Hook

Paste the code below into your functions.php file.

Source: SmashingMagazine

11. Set WordPress Featured Image Automatically

Paste the code below into your functions.php file.

Source: WP Engineer

12. Include All Post Types in Search

Paste the code below into your functions.php file.

Source: WP-Snippets

13. Show all posts from all categories

Add this to the template you want the list to appear.

Source: WordPress Support

14. Automatic Social Media Links

Paste this code inside the loop, probably in your single.php file.

Source: CSS-Tricks

You may also want to read the related articles below.

You like this post? Why not share it with a buddy?

Author

Posted 74 articles already →

Sheila is a new freelance writer based in the Philippines. She has a great enthusiasm for writing. She loves to write anything and everything under the sun. She is a Computer Science graduate who wants to develop and cultivate a web related career. She is highly motivated, determined and detail-oriented person especially with regards to her passion – writing. Don’t forget to Subscribe to our RSS-feed and Follow us on Twitter — for recent updates.

Leave a Reply