Forum Replies Created
-
In reply to: [Resolved] Show member recent post in members loop
Cool @henrywright-1 that’s got it. I found that showposts query, just wasn’t implementing it correctly. I owe you a pint (or 4).
In reply to: [Resolved] Show member recent post in members loopOK it works really really well – except, it brings in not just the most recent, but 3 recent posts, can I limit the number?
In reply to: [Resolved] Show member recent post in members loopOh it’s actually THAT simple? Thanks so much, I’m enjoying learning from you guys 🙂
In reply to: [Resolved] Show member recent post in members loop@henrywright-1 that works!
I need to show the featured image, and link to the profile, so I added the following, but it’s just pasting the image URL, how do I add img src to that and the link to the post?
<?php $user_id = bp_get_member_user_id(); $query = new WP_Query( 'author=' . $user_id ); if ( $query->have_posts() ) { while ( $query->have_posts() ) { $query->the_post(); //display title the_title(); //display content the_content(); //featured image the_field('featuredimage'); } } //reset for next member wp_reset_postdata(); ?>In reply to: Disable messages autocompleteIs there a way to do this? Thanks.
In reply to: [Resolved] Show member recent post in members loopThanks @mercime – however, I’m already successfully showing users posts on their profile – see below. I’m doing this using posts-on-profile but it’s quite out of date:

What I can’t do, is show the most recent post for each user on the members list (on the members home page) – note the placeholder image on the right for each member:

Hope someone can help!
In reply to: [Resolved] Show member recent post in members loopSorry to spam, but totally stuck on this, any ideas?
In reply to: Inline validation on register pageBP Xtra Signup worked well, although it’s 2 years out of date, it seems fine!
In reply to: Getting the large avatarYou’re right @henrywright-1 – just needed to upload the avatars again and it worked 🙂
In reply to: Getting the large avatarHi there
I added this in, and it does get the avatar back but it doesn’t solve the problem. My original code returns the same stretched pixelated avatar, I really need to try and get the large version. See screenshot (mine on top, yours below)
In reply to: Getting the large avatarAh so you think this can’t work as it stands @henrywright-1 ?
In reply to: Xprofile get field data checkbox returns arrayPerfect!

Thanks SO much.
In reply to: Xprofile get field data checkbox returns arrayHi there
In the page template test I used your code exactly, within the profile.php file.
In the text widget I use the following (all of which work except Specialist Sectors):
`<div class=”<?php echo get_post_meta(get_the_id(), ‘Account Type’, true); ?>”>
“>
<?php if ( $sectors = bp_get_profile_field_data( ‘field=Specialist Sectors’ ) ) { ?>
<?php foreach ( $sectors as $sector ) { ?>
<?php echo $sector; ?>
<?php } ?>
<?php } ?>
“><h2 class=”profileHeader”> <?php echo get_the_author(); ?></h2>
<h2 class=”profileAccount”><?php echo get_post_meta(get_the_id(), ‘Account Type’, true); ?></h2>
<h3>Specialist Sectors</h3><h3>Telephone Number</h3>
<?php echo xprofile_get_field_data( ‘Telephone Number’, get_the_author_id()) ?>
<h3>Email</h3>
“><?php echo xprofile_get_field_data( ‘Contact Email Address’, get_the_author_id()) ?>In reply to: Xprofile get field data checkbox returns arrayYes it works on profiles.php… but the text widget I use on a post page works for all the other xprofile fields?
In reply to: Getting the large avatarAh ok thanks, this code doesn’t seem to return anything, can you help me with the error?
<a href="/community/members/<?php echo get_the_author_meta('user_login') ?>"> <?php echo bp_core_fetch_avatar ( get_the_author_meta('user_email'), $size = '192' ); ?> </a>In reply to: Xprofile get field data checkbox returns arrayHi there
I’m using it in a text widget sidebar, which works for all the other fields.
The spelling is correct and there are multiple options selected.
Thanks,
Ian
In reply to: Xprofile get field data checkbox returns arrayUnfortunately that is returning blank too @henrywright-1
Thanks
In reply to: Xprofile get field data checkbox returns arrayOK thanks…so I have switched it around as follows:
<?php echo get_the_author_id(), xprofile_get_field_data( 'Specialist Sectors', $multi_format = 'comma' ) ?>I am now getting something returned, which is unique for each user but it’s returning a number, such as 52, 65 or 1 – I don’t know what these refer to.
Any ideas?
In reply to: Xprofile get field data checkbox returns arrayThanks all… @shanebp I’ve inputted the following but it isn’t showing anything, is my implementation incorrect?
<?php echo xprofile_get_field_data( 'Specialist Sectors', get_the_author_id(), $multi_format = 'comma' ) ?>Thanks
In reply to: Xprofile get field data checkbox returns arrayI See.
Screenshot is here of what we are doing:

I am trying to use it in a sidebar widget on a post page. Using the following PHP in the text widget to get back users info:
<div class="<?php echo get_post_meta(get_the_id(), 'Account Type', true); ?>"> <a href="/community/members/<?php echo get_the_author_meta('user_login') ?>"> <?php echo get_avatar ( get_the_author_meta('user_email'), $size = '192' ); ?> </a> <a href="/community/members/<?php echo get_the_author_meta('user_login') ?>"><h2 class="profileHeader"> <?php echo get_the_author(); ?></h2></a> <h2 class="profileAccount"><?php echo get_post_meta(get_the_id(), 'Account Type', true); ?></h2> <h3>Specialist Sectors</h3> <?php echo xprofile_get_field_data( 'Specialist Sectors', get_the_author_id()) ?> <h3>Experience</h3> <?php echo xprofile_get_field_data( 'Experience', get_the_author_id()) ?> <h3>About</h3> <?php echo xprofile_get_field_data( 'About you', get_the_author_id()) ?>Thanks,
Ian
In reply to: Xprofile get field data checkbox returns arrayReally trying to get this one sorted, can’t find a fix – anybody know?
In reply to: [Resolved] Show member recent post in members loopDoes anyone know of a way do get most recent post in the members loop for each author? Thanks.
In reply to: Xprofile get field data checkbox returns arrayCan anyone help with this?
Thanks
In reply to: Disable messages autocompleteAnyone know if this is possible?
In reply to: [Resolved] Avatar crop not workingI’ve fixed this, this was solved when there was an additional js file being called from the footer in the Reverie file:
<script src="<?php echo get_template_directory_uri(); ?>/js/jquery.min.js"></script>Removing this duplicate fixed the issue.
