WP-Mix

A fresh mix of code snippets and tutorials

Category Archive: WordPress

Posts about WordPress

Page 10 of 17

Find duplicate email addresses in WordPress

This tutorial explains how to find duplicate email addresses in your WordPress database. That way you can delete or modify as needed.

Get All User Email Addresses in WordPress

Putting together a mailing list? Here is an easy way to get all user email addresses from your WordPress database.

Disable WordPress Automatic Updates

In case you haven’t noticed, WordPress auto-updates its core files by default. Neat but not always desired. Here is how to disable auto-updates with a few lines of code.

Using WordPress Filter and Action Hooks

In this tutorial, we have two quick examples showing how to use WordPress filter and action hooks. First we’ll look at how to use filter hooks, and then action hooks.

Date and Time with PHP and WordPress

This post explains the difference between displaying the date and time with PHP vs. displaying the date and time with WordPress.

WordPress Get Category ID from Slug

Quick WordPress snippet for getting the category ID from the category slug.

Limit Characters in WordPress Navigation Links

Here is are two jQuery techniques to limit the number of characters in a string, applied to WordPress navigation links.

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.

Remove ‘Private’ from private post titles

By default, WordPress prepends the string “Private: ” to all posts marked as “private”. Here’s a quick function to remove the private prefix and move on with your life.

WordPress: check if user is logged in

Here are some notes and examples of how to check if a user is logged in to WordPress.

WordPress get all user emails

Quick snippet to get all user emails in WordPress.

Members-only content via shortcode

Here is a sweet little WordPress shortcode to display content only to logged-in users. Visitors not logged in will see a custom message saying whatever you’d prefer.