Blocking Custom Post Types

This is a new method of blocking custom post types. There are two main differences over the method described here and the original method I described here.

First, this method is a little more scalable.  If you have multiple custom post types and want to set a blocking value for each, you only need to add to the settings array.  Second, this method allows you to override the blocking value on an individual custom post type post than  you have set for the custom post type as a group.  This operates the same as regular posts and pages.

(If you want to add a meta box for blocking/unblocking individual custom post type posts, there is an additional code snippet you can add here.)   [Read more…]

Restrict a post or a page to a specific user role

In the past, I have put up posts about restricting content to a created user “level,” restricting content to a specific user, etc. Interestingly, we have not yet touched on the subject of restricting content by user role.

The method used here is very similar to what was done to restrict a post or a page to a specific user. In fact, that code was my starting point – it really took some minor changes. So I’ll primarily focus on what is different.

[Read more…]

Move the Username Field in the Registration Form

By default, the username field comes at the beginning of the form rows array.  This field is not included in the plugin’s fields manager tab, so you can’t re-order it via drag-and-drop like the rest of the fields.

This quick and dirty code snippet that will allow you to move the location of the username field to come after any other field in the registration form.   [Read more…]

Add a separator line of text in the registration form (wpmem_register_form_rows version)

Before the wpmem_register_form_rows filter was added, the way to insert a separator line of text into the registration form was by using php’s str_replace function to search/replace text/HTML in the form with the wpmem_register_form filter. While that way still works, wpmem_register_form_rows allows you an alternate approach.   [Read more…]