• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • The Famous Blog
    • Blogging
    • Social Media
    • SEO
    • Marketing
    • Design

Famous Bloggers

How To Blog and Start a Business

  • Contribute
    • Submit News
  • Login

Home » The Famous Blog » Adding Custom Fields in WordPress User Profiles – Tip for Multi-Authors Blogs

Adding Custom Fields in WordPress User Profiles – Tip for Multi-Authors Blogs

December 2, 2011 - Last Modified: August 15, 2012 by Hesham Zebida 4,276

Custom Fields in WordPress User Profiles

Being running a Multi-Authors blog, I try to find ways and develop ideas to serve our blog authors. In this post I am going to talk about adding custom fields to user profiles in WordPress, this is a very simple to use code, and it can be very useful for Multi-Authors blogs that accepts guest posts.

The main reason that you should use this technique is to store the guest author’s data so you can easily display it wherever you want, for example: The Author Box that has information about the post authors below each post.

However, many other WordPress developers talked about this before, they even show different techniques. But, I need to publish this info on the blog for two main reasons; my first reason is to show you how we do it here at FamousBloggers.net, and the second reason is I will writing more about running and developing Multi-Authors blogs in the future, so I will be linking to this post as a reference.

Adding Custom Fields in WordPress User Profiles

These are the fileds I’ve added to the user profile by using the user_contactmethods filter, you can change it to whatever fits your needs:

Add this code to your theme’s function.php file, or custom_functions.php file if you are using Thesis Theme.

https://gist.github.com/3364246.js

As you can see, it’s pretty simple to insert new custom fields into the WordPress user profile. Now, if you check your WordPress profile, it should look like this:

WordPress user profile

Note: If you are wondering how to remove the website field from the user profile, then just don’t! I am not able to find a working way to do it, if you know how that can be done without touching the WP core files, then I appreciate if you drop me a line!

Why adding the Blog Title Custom Field

You will notice that I’ve added a few custom fields to store social profiles, and a new filed for “Blog Title“, this is where the author should put the title of the best keyword for her/his blog, so instead of the traditional way of crediting the author’s link “author blog” or “visit blog” which is very static. In my case, I was able to present a better SEO experience for authors being linking to their blogs this way “visit <Blog Title>“.

Display the Fields Values

Now that you’ve added the new fileds, the next step is to display them on the blog, here is an example on how to display a field inside the loop (In this example I am adding a link to the author’s blog using the blog title as the keyword and title for the link):

https://gist.github.com/3364306.js


If you are using Thesis Theme, then you probably should go and check:

  • My post on how to customize WordPress author archive page in Thesis.
  • My Thesis BlogSkin that was developed for multi-authors blogs.

If you want more tips, tricks and good advice on how to run and customize your multi-authors blog, then keep an eye open on the blog, or subscribe to our blog feed.

ShareTweet

Filed Under: Wordpress, WP Multi-Authors

About Hesham Zebida

Follow @hishaman

I create websites with WordPress, and I develop Schema Plugins to help SEOs. I am a social network lover. I am also the night creature who works hard to keep this project up. Owner and founder of the Famous Blog.

Reader Interactions

Related Posts

  • Is a Custom Design Essential to Your Blog’s Success?
  • Blogging Limiting Beliefs about Money5 Blogging Limiting Beliefs about Money that You Need to Release
  • What’s Up Bloggers! Roundup #8 with Don Sturgill
  • What is Keeping Your Blog from Making Money?What is Keeping Your Blog from Making Money?

{ 31 Responses }

  1. Patrick Moore says:
    Your GitHub code appears to be gone. Any chance you can update this post to include the code snippets? I'm trying to add this functionality in my site (WP 3.5.1) Thanks!
  2. irfanali says:
    Hi Francis, As far as differentiating, do you mean when you post a guest post on your blog? I created a new user account on my blog with the name “Guest Author.” Then whenever I publish a guest post, I change the author (in the blog editor) to “Guest Author” so that everyone can see that it was written by a guest and not me.
  3. simon says:
    Remove fields: function extra_contact_info($contactmethods) { unset($contactmethods['aim']); return $contactmethods; } add_filter('user_contactmethods', 'extra_contact_info');
  4. Craig says:
    Is there a way to do this with an image upload field?
    • Hesham Zebida says:
      I am sure there is a way, but I haven't tried it. I prefer using gravarat.com's image as it's the most popular way to get author's photo. However, maybe take a look to this resource at wordpress.stackexchange.com, it may give you some ideas!
  5. Raaj Trambadia says:
    Hey Hesham. Thanks for the code. I'd like to edit it a bit for THESIS USERS because I was having some problem putting it in my Thesis Author Box. Here's what I changed - Adding ---- ---- after <?php (at the end). Before doing this, my custom_functions.php was messed up. Thought I'd share some coding knowledge :) Hope it helped. Thanks again!
    • Hesham Zebida says:
      I didn't get your code!
      • Raaj Trambadia says:
        I typed the code! I don't know why it didn't show up in the comment :O Anyways, here's what I changed - Proud Owner Of: <a href="" title=""> (Hope you can see it here in the comment).
        • Raaj Trambadia says:
          Aah! It's not showing up! Damn! Here's the link to the image for the change in the code - http://www.thesislove.com/testing/wp-content/uploads/2012/06/Untitled.png
          • Hesham Zebida says:
            You just need to use the code tag!
            • Raaj Trambadia says:
              LOL. Just went out of mind that I can even use code tags in comments :D Anyways, that code (in the picture) works with Thesis. Before putting the few extra things in the code you provided, my custom_functions.php got messed. Thanks :)
          • Hesham Zebida says:
            I see! There must be something wrong. Thanks for the code.
            • Raaj Trambadia says:
              Hahah :D My pleasure! (Nice way to teach without writing :P)
  6. James says:
    I had a question would you know how I could email data collected in the custom profile fields? I am looking for customers to have the ability to provide information to us using the custom fields created in their profile. I was hoping to find a way to trigger an email each time new data was saved? There is currently not a plugin that you can get and store data that is unique to the user for this purpose.
    • Hesham Zebida says:
      Hi James, I am not sure, but I did a quick search, and here is what I found, maybe this idea could work for you some how, check Send automatic mail to WordPress Admin when user/member changes/adds profile post at stackexchange. Or WordPress Function: Every time a user updates his/her profile an email is sent to the site. However, I think you need a custom code for this as I don't know any ready plugin dose this job! I hope this helps.
  7. Mike says:
    First off I want to say thank you for this. I know enough html/php to get by but not the advanced stuff. I'm trying to add links to authors profiles like you show, however, when I try the if statement it doesn't work correctly. *** code removed by editor. That works for me however I would like to use the if statement to take it off for authors that don't fill in that information. I tried using the code in the example you gave however that didn't work. do I need to add more to it? Thanks for the help
    • Hesham Zebida says:
      Hi Mike, why don't you try to learn how to write an if statement, it's easy and you can find it by a simple search in Google!
  8. Mika Castro says:
    Thanks for the tips! I have seen what the custom field can do, but I am bit novice. I need to add a custom piece of text to each post. How do I do this? With custom fields I have to add the number and url each time as I can't leave the value empty.
    • Hesham Zebida says:
      Assign custom fields to a post is a little different than the profile custom fields I am talking about here in this post! You can read about custom fields at the WP codex, this should help.
  9. Chandan says:
    Hi Hesham, awesome tips. Is there any plugin available for custom field?
    • Hesham Zebida says:
      Try this plugin, just be aware it still a beta and I haven't used it before, it's called Developer's Custom Fields pluign.
      • Mr.Bhavesh says:
        Hey Hesham Zebida, thanks for the plugin.Its awesome!!!
  10. Jed P. says:
    Finally ..I got what I wanted ....Thanks for this amazing short guide.
  11. Azhar says:
    Thanks Hesham this post is milestone is learning wordpress at professional level. I am newbie in this field.
  12. James says:
    great post, thank you, could you please write the post about best adsense options fro multiple author blogs. James
  13. Raj says:
    I do agree that custom fields have always confused me! Thanks for this introduction, let me figure out if I can use it somewhere..
  14. Adrian says:
    Useful tutorials! I know few people who know how to use this custom fields WP. It would really be great especially if this actually offers great SEO benefit to the authors. At least their hardwork will pay off.
  15. Mark says:
    Hesham, That's awesome Bro. I was recently wondering how to do that, but you know, its just one of those things that was on the back burner that I didn't read about yet. And here you just delivered it to my door step ;) I love customizing scripts and Wordpress or its themes are no exception. Mark
  16. Devesh says:
    Hi Hesham, Awesome tip, man. Very useful for multi author blogs and this makes author profile even better. Thanks for sharing.
  17. Kostas says:
    Hi Hesham Even though I use blogskin which has these options it's a great share for all our fellow bloggers who accept guest posts...
    • Hesham Zebida says:
      I am trying to free some time to write more information about building multi-authors blogs, so I needed to publish some basic posts that I will use to link at while we go more advanced.

Primary Sidebar

Our Newsletter

Our Newsletter

Join our mailing list to receive the latest news and updates from our blog.

You have Successfully Subscribed!

Popular Articles

  1. How to Set Half Rating Scale 1-5 (Poor to Excellent) by Words 116,076 views
  2. Top 10 Sites Where You Can Get Paid to Write 115,888 views
  3. How to Get Targeted Twitter Followers Fast 92,104 views
  4. 66 Awesome Social Media Quotes 78,422 views
  5. 50 Traffic Sources You Should Milk Like Crazy 75,143 views
Schema Structured Data for wordPress
  • Blog
  • Contribute
  • About Us
  • Contact Us
  • Disclosure Policy

Copyright ©2020 · FamousBloggers - All Rights Are Reserved · Powered by Genesis Framework

  • Login
Forgot Password?
Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.
Go to mobile version