WordPress.org

Ready to get started?Download WordPress

Forums

WP Mingle
Displaying custom profile fields using Mingle (2 posts)

  1. KeenanPayne
    Member
    Posted 1 year ago #

    Okay, so I am using the Mingle plugin to add some networking functionality for a website I am creating for a client. I am having Mingle handle displaying user profiles and friends, but WordPress to actually register users and put in fields.

    Mingle has the ability to add custom fields (ex: Twitter, Facebook, etc). However, there is now way to display these custom fields individually. So I have added my own custom fields to WordPress using the functions.php file:

    /* Add Profile Fields */
    function add_new_contactmethods($methods){
    	$methods['twitter'] = 'Twitter';
    
    	return $methods;
    }
    
    add_filter('user_contactmethods','add_new_contactmethods');

    and am displaying them within one of the Mingle templates (mingle/classes/views/mngl-profiles/profile.php).

    Here is the code I am using to display them:

    <?php if ( get_the_author_meta( 'twitter' ) ) { ?>
    	<a href="http://twitter.com/<?php the_author_meta( 'twitter' ); ?>" title="Follow @<?php the_author_meta( 'twitter' ); ?> on Twitter">
    		<div class="tile bg-color-twitter icon">
    			<div class="tile-content">
    				<img src="<?php echo THEME_DIR; ?>/images/icons/twitter.png" alt="Twitter" class="socialIcon" />
    			</div>
    			<div class="brand">
    				<span class="name">@<?php the_author_meta( 'twitter' ); ?></span>
    			</div>
    		</div><!-- .tile -->
    	</a>
    <?php } ?>

    Now whenever I go to a profile page that is generated by mingle, (http://website.com/admin or http://website.com/dylan), whoever is currently logged in at the moment will have their custom fields shown, not to the user whose profile is being shown.

    Does that make sense? I can provide more code or elaborate if need be. I would really, really appreciate any and all help I can receive on this, the project is really time-sensitive.

    Thanks,
    Keenan

    http://wordpress.org/extend/plugins/mingle/

  2. Curt44319
    Member
    Posted 10 months ago #

    I had a similar challenge.
    Ended up writing the code/hack to query the database directly myself.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic