Many users would like to display different sidebar widgets based on the user’s login status, including restricting certain content from view of visitors who are not registered or logged in. This tutorial will explain how to set up widget areas to display based on the user’s login status. This is similar to displaying different menus to users based on login, but is slightly more complex. Don’t let that detract you from trying this technique, however, as it is a powerful tool for your site. Continue Reading →
tips
Add a database generated list of values to the registration form as username
This post will show you how to replace the username selection in the registration form with a dropdown list of choices generated from a database. This is similar to what is described in this post except that in this version, we are using this as the username selector. Continue Reading →
Add a database generated list of values to the registration form
This sample code is an example of how to take a list of values from a database table and use it to generate a dropdown select option in your registration form. You can get as involved or as simple as need be from this framework.
I will be giving an example that will take a list of names from a database table so that the user can select their name from the list. To make it a little more interesting (and functional), I will update the table when the user registers so that name will not show in the registration form in the future. Continue Reading →
Adding shortcodes to other locations
By default, WordPress only parses shortcodes in the main content area. Suppose you want to use shortcodes (WP-Members or otherwise) in locations other than the body text? Here are some snippets you can add to your theme’s functions.php file to allow the use of shortcodes in the sidebar, comments, and excerpts:
Continue Reading →Remove the name# anchor from the ‘more’ link
This particular code snippet isn’t necessarily part of the plugin itself. But since the plugin relies on post excerpts, it can help fix a what can be a minor annoyance on some sites. WordPress automatically puts in an anchor link to where the ‘more’ tag is. So when you click “read more” the browser will not only load the full post, it will jump to the location where the ‘more’ tag is.Depending on the length of your excerpt and the header of your site, this can make browsing awkward; especially if your average reader is like me – wanting to read the entire post from the beginning.
Continue Reading →