WP-Mix

A fresh mix of code snippets and tutorials

Search query: shortcode

Found 24 matching results

Page 2 of 2

Display external files with a shortcode

Here is a cool snippet to display an external file anywhere in your WordPress theme.

WordPress Require User Login

This post shows a quick and easy way to require that the user is logged in to WordPress in order to gain access to some private content.

WordPress s2member PayPal Fix

For those using s2Member and getting no response after clicking the “Continue” button on the PayPal.com site, here is a quick possible solution.

WordPress Display Version Number

Here is a simple function to display the current version number for WordPress.

Display a Simple “Tweet This” Link

Twitter changes their API quite a bit, however it is still possible to display a simple “tweet this” link anywhere on your web pages.

WordPress Do Stuff on First User Login

Here is a code snippet that runs the first time a user logs in to their registered account. Useful for sending custom welcome emails, or whatever.

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.

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.

Display Images with User Submitted Posts

Here is a quick recipe for displaying linked images for images submitted with the User Submitted Posts plugin.

Require user login for any plugin

Here’s a quick trick to require user-login for any plugin. For example, if you want users to be able to use your chat plugin only if they are logged in. Here’s how..

Private notes and members-only content

Two cool tricks today, shortcodes to display private notes and members-only content.

Obscure template tags that rock

Here are my favorite “lesser-known” and perhaps even obscure template tags for WordPress: