WP-Mix

A fresh mix of code snippets and tutorials

Category Archive: WordPress

Posts about WordPress

Page 16 of 17

Display a number for each post

To display an auto-incrementing number for each post, add the following snippet to your theme’s functions.php file:

Increase upload limits for WordPress

If you’re encountering restrictive upload limits in WordPress, here is a simple fix:

Remove sub-menus

Quick snippet for removing or disabling WordPress sub-menus:

Disable default WordPress widgets

Delivering a clean custom theme involves removing components or features that will not be used. Here’s how to disable WordPress default widgets:

How to change your theme’s appearance

If you want to change certain aspects of your theme, you should get familar with its different files.

Why aren’t permalinks working?

Here is a quick guide for troubleshooting why WordPress permalinks might not be working.

Random WordPress Snippets

Just a collection of miscellaneous & random WordPress snippets for your enjoyment.

Exclude category in WordPress

Ever wanted to exclude a category in WordPress? Turns out it’s pretty easy to do without having to install another plugin.

Disable WordPress update reminders

If for whatever reason you would like to disable WordPress update reminders, read on.

Escape input with WordPress

WordPress makes it easy to escape untrusted input to prevent SQL-injection, XSS (cross-site scripting), and other nefarious bits of text. Here is a quick rundown of WordPress’ built-in escape functions.

Disable external URL requests

During development there may be situations where you want to prevent WordPress from making URL requests to external websites. Here is a simple way to disable external URL requests during development.

Use WP functions outside of WordPress

Here’s how easy it use to use any of WordPress default functionality from any PHP file outside of the WordPress installation directory.