WordPress.org

Ready to get started?Download WordPress

Forums

in_author?? (kinda like in_category) (6 posts)

  1. ChiefAlchemist
    Member
    Posted 4 years ago #

    I'm modifying a plugin that uses in_category as a "filter" to compare a post to a parameter as set via the plugin's admin. For example, if post is category X, Y or Z then do {blank}.

    I'd like to do the same of the post's author. But there doesn't seem to be an in_author or anything close for that matter. Anyone have any suggestions?

    Finally, can anyone share a link to how I can add fields to the users profile? Or am I better off doing that via a plugin and/or outside the loop?

  2. Russell Heimlich
    Member
    Posted 4 years ago #

    Adding custom fields to the user profile is a snap in WordPress 2.9 http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields

    For 2.8 and earlier try this out...
    http://www.dquinn.net/adding-custom-user-meta-profile-fields-wordpress/

  3. ChiefAlchemist
    Member
    Posted 4 years ago #

    Thanks King! I'll check these out. I'm on 2.9.x so it shouldn't be a problem. It's so damn hard to keep up sometimes, eh :)

  4. ChiefAlchemist
    Member
    Posted 4 years ago #

    Hey King... Ya got anything up your sleeve on how to add custom fields to posts. I would presume it's similar but before I go searchin' I figured I'd ask.

  5. MichaelH
    Member
    Posted 4 years ago #

    Custom Fields for posts/pages are a native WordPress capability, but there are plugins that make it 'easier' to enter custom fields.

    Related
    Custom Fields
    http://www.google.com/search?q=wordpress+plugin+custom+fields

  6. ChiefAlchemist
    Member
    Posted 4 years ago #

    Thanks Michael H

    Unless something has changed since 2.8.x I wasn't too impressed with that implementation of customer fields. The whole drop down UI bit struck me as somewhat hokey.

    I'd like to add a field so that it looks like it's actually part of the post's UI - and not some "add on". Does that make sense? I've seen a couple themes do it but rather than dig under the hood I wanted to ask first.

    Cheers,
    MFS

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags