WP-Mix

A fresh mix of code snippets and tutorials

Popular Posts

All posts ordered by popularity

Page 5 of 30

WordPress redirect logged in users

Nice WordPress snippet to redirect logged in users to any location. Also optionally redirect visitors who are not logged in to WordPress.

Google Translate in 2 Steps

Follow this simple two-step tutorial to enable users to translate your web pages into many different languages. Great way to increase exposure and traffic.

WP Admin link to All Options

The WordPress database houses more settings than those available in the Admin Area. Here’s a quick code snippet to display an “All Options” screen to view otherwise hidden data.

Difference between home.php & front-page.php

This article explains the difference between WordPress’ home.php and front-page.php theme templates, as related to the display of your site’s front page. For best results, log in to the Admin Area of your WP installation and follow along with the text.

WordPress Create Upload Files and Directories

This tutorial explains how to create new files and directories in the WordPress /uploads/ folder.

.htaccess Force GET or POST Requests

Here is how to force all HTTP requests to be either GET or POST. Easy to modify technique can be used for other types of requests as well.

Get all meta data for WordPress user

Quick tip to get all meta data for any WordPress user. Warning, arrays ahead..

Add titles to previous_post_link & next_post_link

Here’s a quick way to include a title in previous_post_link() and next_post_link().

WordPress Shortcode Display Search Form

Here is an easy custom WordPress function to display your theme’s search form via shortcode. This makes it easy to display the search form on any Post or Page.

WordPress get all user emails

Quick snippet to get all user emails in WordPress.

Combine all CSS files with PHP

Here is a simple PHP script that will combine all CSS files (stylesheets) in a given directory. Delivering one CSS file with your web pages is much faster than delivering multiple files because there are fewer HTTP requests involved.

CSS select all except last child

Blazing fast snippet for you today: how to select all children except the last child. Targeting HTML with CSS has never been so much fun..