Latest Snippets

Shortcode: Recent Posts

Add following snippet to “functions.php” Snippet Usage Courtesy: Smashing Magazine

custompostshortcode

Shortcode: Execute Multiple Custom Post Type Queries using WordPress Shortcodes

Add following snippet to “functions.php” Snippet Usage Courtesy: GraphicBeacon

Snippet: Remove or replace one ore more classes from wordpress menu

Add following snippet to “functions.php” Snippet Result “sub-menu” class is removed from the generated navigation and “current-menu-item” class will be replaced with “current”.

Snippet: Redirect Main Site To Sub-Site

Add following snippet to “functions.php” Snippet Result All the requests to ‘www.example.com’ will be redirected to ‘www.example.com/subsite’.

Snippet: Disable Category, Author, Date and Tag archives

Add following snippet to “functions.php” Snippet Result Snippet will redirect the category, date, tag and author links to “404 not found” page.

Snippet: Log errors to a file

Add following snippet to “wp-config.php” Snippet Result This will log all errors notices and warnings to a file called debug.log in wp-content (if Apache does not have write permission, you may need to create the file first and set the appropriate permissions (666) )