Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6093637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:35:00+00:00 2026-05-23T12:35:00+00:00

This post relates to WordPress and CIMY User Extra Fields. I do not think

  • 0

This post relates to WordPress and CIMY User Extra Fields. I do not think you need a knowledge of the latter to help with this problem, as it seems to be a WordPress issue more than anything.

CIMY User Extra Fields is a plugin that allows registered users to have much more information in their profiles. You can add as many fields as you want. You then have to edit “author.php” to pull in the new information.

I am currently using the following code to pull in the new user profile fields:

<?php if (have_posts()) { $flag = true;  while (have_posts()) { the_post();
if ($flag) { $value = get_cimyFieldValue(get_the_author_ID(), 'dj-name');
if ($value != NULL) echo "<p><strong>Staff Bio: </strong>" . cimy_uef_sanitize_content($value);
echo "</p>";
$flag = false;    }}}?>

The issue is this. Some of my users have 0 posts and this code will only pull the extra field content for the user if that have 1 post or more. This is due to the “if (have_posts())” function I suspect. Is there someway to modify the code to display the information even if the user has 0 posts?

Thanks
Zach

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:35:00+00:00Added an answer on May 23, 2026 at 12:35 pm

    If it’s not a need that a user must have a post to have CIMY values stored (which I assume), you just don’t need to check for post-count > 0. You probably have copied that chunk of code over from a post template.

    The following example just takes the value, and if it is set, will do the output via echo:

    <?php
      $authorID = get_the_author_meta('ID');
      $value = get_cimyFieldValue($authorID, 'dj-name');
      if (!empty($value))
        echo '<p><strong>Staff Bio: </strong>'
             , cimy_uef_sanitize_content($value)
             , '</p>'
        ;
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From this post . One obvious problem is scalability/performance. What are the other problems
WordPress requires you give each blog post at least two fields: a title and
This post relates to this: Add row to inlines dynamically in django admin Is
This question relates to my other post . Ok so after a bit more
Loosely related to this post , I need to get a list of all
This question relates to ASP.NET MVC3 using the Razor Engine. What I need to
This question is related to a previous post of mine Here . Basically, I
This question is related to the post about having abstract at the titlepage. I
This post reference to the One Definition Rule. Wikipedia is pretty bad on explaining
So this post talked about how to actually implement url rewriting in an ASP.NET

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.