407 reputation
210
bio website
location
age 28
visits member for 2 years, 6 months
seen Sep 24 at 1:48

Jul
23
comment When moving a WP site, why does wp-admin redirect to old site?
The GUID should not be changed. Read more here: codex.wordpress.org/Changing_The_Site_URL#Important_GUID_Note
Jul
16
comment Version control with a team of non-developers
If you only version control half your project, you're not really reaping the benefits. My recommendation would be to not go down that road. If a user touches code, he or she checks it in.
Mar
11
comment Contact information footer
Make sure you follow the specs: Max. 20 characters, can not contain capital letters or spaces codex.wordpress.org/Function_Reference/register_post_type
Feb
11
comment How can I save repeatable fields with one value inside an array?
Yes in terms of $option_name. The serialized array you printed though, does not seem to contain the image ID, just the caption. I don't know what your specific needs are, but I would assume the array would look much like the array I posted above ($_POST['fields']) when stored in the database, in terms of structure i.e. array of image ID/caption pairs.
Feb
11
comment How can I save repeatable fields with one value inside an array?
$option_name could be a string like slides... it's just a key in the database to retrieve your options i.e. array of slides. In terms of Array, you're trying to print an array as a string, but it's an array. Whatever your variable is called that prints Array, try this: echo '<pre>' . print_r($your_variable, true) . '</pre>' and you'll see exactly what the array contains. Then you can grab the appropriate string via the index.
Feb
11
comment How can I save repeatable fields with one value inside an array?
Yes, you should replace fields with something more descriptive, such as slides, but I'd make it more unique in case someone or something else ever uses slides. $option_name would be any string, also as unique as possible, that you'd use to save/retrieve the contents of your array from the database. get_post_meta returns an array of custom fields (in case you have more than one) and unless you specify true as the third argument e.g. $slides = get_post_meta($post_id, $option_name, true), you'll have to supply the index e.g. $slides[0].
Nov
18
comment How to move from page template to page template
Post to your second page.
Nov
2
comment Allow User to Edit Page Based on their Email
There are a few benefits. 1. If email addresses change, they change in one place and everything continues to work. 2. Since you are using built-in WordPress components (users, taxonomy, roles), there are WordPress functions to help make what you want happen. 3. It keeps things flexible, in case you want to build on them or generate reports later.
Nov
2
comment Allow User to Edit Page Based on their Email
Let me just throw this out there: a faculty member is a WordPress user to begin with. That user could be assigned to a custom role called faculty. Any additional data that needs to be saved for those users in that role can be stored via user meta data. Now, for your class custom post type, you'd have a taxonomy. The taxonomy options would be mirrored to users of type faculty. You can then select, per class, one or more faculty members (in case a class is taught by 1+). When the user logs in of type faculty, you display only those classes in which they are assigned for in the taxonomy.
Sep
29
comment wp_set_post_terms is assigning only the last of several terms to a post
I don't believe that this is an issue with WordPress, that's just how you chose to setup your loop. From WordPress' perspective, you can assign many terms to many posts.
Sep
17
comment How to use the password_reset hook to validate new password and display error
The thing is, I found a way to enforce the requirements server-side, I just don't know enough about WordPress and how to use WP_Error to display corresponding errors on the page.
Sep
17
comment How to use the password_reset hook to validate new password and display error
The plugin you mentioned only enforces this on the profile page, not the password reset page.
Sep
14
comment Overwrite default WordPress wording
I noticed today that it didn't change the language on the password reset page. It still contains the old language, presumably because the plugin doesn't get loaded on that page? Do you have any thoughts on how I can change that there as well?
Sep
13
comment Overwrite default WordPress wording
Perfect! Had to make some small adjustments, but pointed me in the right direction.
Sep
12
comment Multiple Email Addresses, One User
Not to WordPress, but you can accomplish that particular validation with PHP's array_unique function: php.net/manual/en/function.array-unique.php
Jun
1
comment How does Wordpress handle sessions?
Right, but this also has to work if a user is not logged in to Wordpress. Is there a unique user identifier for just visitors that I can retrieve?
May
4
comment Is there a recover_post hook to go with trash_post hook?
I gotcha. Thanks for your time and help. I wish it was a bit more consistent, but everything is now working thanks to you!
May
4
comment Is there a recover_post hook to go with trash_post hook?
Last question: I'm using the save_post hook, but it appears that wp_save_post also works, but I'm seeing that save_post is by far more widely used. Do you have a recommendation on that?
May
4
comment Is there a recover_post hook to go with trash_post hook?
How can it still work now though, when there's no reference of it in 3.3.2? (Saw your updated comment that answers this). So the safest bet is to use wp_trash_post and wp_untrash_post for consistency.
May
4
comment Is there a recover_post hook to go with trash_post hook?
Yes, you are right about. The repository I searched had trash_post in that plugin, however the install that I tested trash_post on did not have this plugin (it was a new install) and trash_post did work. This doesn't make any sense though.