76 WordPress Tricks
Jeff Starr has an extensive list of WordPress code snippets:
- WordPress Shortcodes
- WordPress Permalinks Outside of the Loop
- Custom Message to Returning Visitors
- Recently Updated Posts and Pages
- Custom Content to Search Engine Visitors
- Last Modified Time and Date for Posts
- Display Total Number of Trackbacks and Pingbacks
- Display Recently Registered Users
- List all of Your Site’s Posts
- List WordPress User Information
- Display List of Scheduled Posts
- Display Private Posts to Logged-in Users
- Display Posts from Exactly One Year Ago
- Custom CSS Styles for Recent Posts
- New WordPress-2.7 Comments Loop
- Backwards-Compatible Comment Templates
- Disable WordPress Post Revisions
- Limit WordPress Post Revisions
- Remove WordPress Post Revisions from the Database
- Reduce Comment Spam by Blocking No-Referrer Requests
- Prevent Google Analytics from Tracking Admin Pages
- Meta Descriptions without a Plugin
- Differentiate Between Posts Depending on Presence of Excerpt
- Modify the wp_options Table via the WordPress Admin
- Alternate Comment Styles
- Automatically Remove Code Mistakes in Posts
- Automatically Disable Comments and Trackbacks in Old Posts
- Access Post Data Outside the Loop
- Display Posts for a Specified Time Period
- Unique Single Post Templates for Different Categories
- Display Performance Statistics for WordPress Pages
- Custom Post Thumbnails in Two Steps
- Highlight Author Comments
- Easy Random Posts
- Display Dates for Groups of Posts
- Display a Sticky Post in the Sidebar
- Display Latest Comments without a Plugin
- Display Most Commented Posts without a Plugin
- Change Permalinks from Date-Based to Post-Date Only
- Test for Sub-Pages
- Multiple Widgetizable Sidebars
- Remove Fancy Quotes from Comments
- Display a List of All Untagged Posts
- Easy Display of Custom Headers, Footers, and Sidebars
- A Better Way for Users to Logout
- Display a Custom Message on a Specific Date
- Display Three Columns of Posts
- Disable WordPress Search Functionality
- Display Posts with Specific Custom Fields
- How to Number Your Comments, Pingbacks, & Trackbacks in 2.7+
- How to Number Your Comments Using the Classic Loop
- Invite Readers to Comment via Feed
- Display the Total Number of Users for Your Blog
- Automatically Insert Content into Your WordPress Post Editor
- How to Prevent Duplicate Content
- Conditionally Display Full Posts or Excerpts
- Display Related Posts without a Plugin
- Drop-Dead Easy Styles for Author Comments
- Display Posts Upcoming Scheduled Posts
- Display Automatic TinyURLs for Your Posts
- Implement a Site-Maintenance Page for Your Blog
- Display the First Image from Each of Your Posts
- Display Most Popular Posts without a Plugin
- Automatically Highlight Search Terms
- Automatically Disable Widgets
- Display All Images from Your Post Content
- Display Category List in Two Columns
- Show Ads or Other Content Only in the First Three Posts
- A Better Way to Display Recent Comments without a Plugin
- Selectively Disable Automatic Post Formatting
- Browser Detection via WordPress’ body_class Function
- Get Post or Page Contents as a PHP Variable
- Simple Example of How to Use WordPress Cron
- Add More Default Avatar Choices to the WordPress Admin
- Add a Private Page to Your Navigation Menu
- How to Add Additional Links to wp_list_pages
76 WordPress Tricks Read More »