List posts in a WordPress while loop. Usage: When you need to create a WordPress Loop, you can create a while loop.
All WordPress Gists and Snippets
Find all WordPress Gists and Snippets at one place. This ultimate collection of WordPress Gists is created and submitted by WordPress community and users.
Enqueue WordPress Scripts and Styles
Different ways to enqueue WordPress scripts and styles. Usage: Enqueue scripts and styles from parent or child themes, and even external links.
Get Post Info by Slug
Pull the ID first, then you’ll have access to the post’s data. Usage: If you only have a post’s slug, you can easily get the ID of it, and than pull that post’s info. Useful for when you can only get a post’s slug, but need to get more info for that post.
Get Image URL from Image ID
Get the URL of an Image by the ID. Usage: If you need to get the URL for a Media Image uploaded, you’ll first need to know the ID of the image. What sucks about this is – with this approach you will either to know the Image ID specifically. There is another way to […]
Create a Search Shortcode
Add a Search Shortcode to a Page/Post and even in a Template Usage: Add a Search form to your Post Content (Post -> Editor -> Text Tab) or to a template via do_shortcode.
Create a WordPress Foreach Loop
List posts in a foreach loop. Usage: When you need to create a WordPress Loop, you can create a foreach loop.