Forum Replies Created
-
You have to give the field a title when you add new profile fields via WP Admin > Users > Profile Fields. Whatever you’ve chosen as your field title is what you should use
you’re right, I just tested myself and it doesn’t do the job. This will work – I just tested it out on my dev install:
<?php if ( $string = xprofile_get_field_data( 'BIO', get_the_author_meta('ID') ) ) { echo $string; } ?>Note: Replace BIO with your field name.
@3rdaxis did you change the field name to the name of your bio field?
It all very much depends on where exactly you want to display the bio info.
$user_idis the key variable you need, but obtaining this value is done differently depending on where you are on your website.If you want to display bio info in a member’s blog post footer then add this to your theme’s single.php file:
<?php $user_id = get_the_author_meta('ID'); echo xprofile_get_field_data('field=BIO', $user_id); ?>Note: You will need to change BIO to whatever you’ve called your bio field when setting it up.
In reply to: One plugin not using the same template as the rest.rtMedia has a templating system where you can override the default templates by copying files to your theme. Also, are you sure itit using page.php? Check it isn’t using plugins.php as many plugins tend to do.
@cambridge15 Run your website through http://tools.pingdom.com to see which resources are being loaded. That should show you which scripts you need to focus on.
@eossipov I think the jQuery being enqueued was v1.10? I’m using BP 1.8.1 and WP 3.6.1
@eossipov thanks for the help. My problem was resolved with the code I just posted. Just had to dequeue jQuery and use Google’s latest copy instead.
@cambridge15
wp_dequeue_script( 'jquery' );goes into your theme’s functions.php file but you need a bit more for it to work:function my_dequeue_jquery() { wp_dequeue_script( 'jquery' ); } add_action( 'wp_footer', 'my_dequeue_jquery', 11 );Hey @hugo
1. Lol! I’m lazy and a really bad designer!
2. You just answered my question with this! jQuery is enqueued but I seem to need the latest version. Not sure including jQuery twice done me any favours. Just used
wp_dequeue_script( 'jquery' );which solved my problem.Thanks Hugo 🙂
In reply to: Activation email – second time round causes errorThe activation form is there mainly to give website admininstrators the ability to activate users accounts manually. So, removing the form won’t cause any problems.
One issue with the text you’ve added to the page – keep in mind any logged out website visitor viewing the activation page will see that text – so “your account has already been activated” won’t always be true.
In reply to: New User ActivationA partial solution is in the pipeline, although it hasn’t been added to core yet
https://buddypress.trac.wordpress.org/ticket/5042
If the user “second clicks” and they are logged in, they’ll be redirected away from the activation page. If they’re not logged in then they’ll see the activation key form thingy. Whilst not a full solution, it’s an improvement.
In reply to: [Resolved] Show posts written by user on profile@hughshields have you thought about a CSS solution?
#posts-personal-li { display: none; }#edit-personal-li { display: none; }In reply to: [Resolved] Show posts written by user on profile@fitnessblogger when @azchipka says adjust the path in the plugin to achieve /author/username I assume that means just getting rid of /posts/? I’m not familiar with the plugin. @azchipka should be able to help with specifics.
If you just want to show posts on a BP profile then my code should work:
Alternatively the plugins I mentioned earlier by buddydev.com are brilliant.
In reply to: [Resolved] Show posts written by user on profile@hughshields If you’re just getting started with PHP and prefer a plugin, try BuddyBlog – http://buddydev.com/plugins/buddyblog/ and Simple Front End Post http://buddydev.com/plugins/bp-simple-front-end-post/
You can let your members blog directly from their BuddyPress profile. A list of posts on profile comes as standard too.
In reply to: Upload Avatar on register page.This could be something in your theme conflicting with the jCrop script.
In reply to: New member not being added to members areaHas that person activated their account? Until they have, you’ll see them in the admin area only.
In reply to: [Resolved] Show posts written by user on profile@fitnessblogger you’d add it to the members/single/profile.php file
Make sure you include the opening and closing PHP tags or it won’t work
<?php and ?>In reply to: Avatar not cropping properlyTry deactivating all of your plugins
I can see you’re running lots! I reckon there is some sort of conflict happening which is causing problems with jCrop (the cropping function BP uses to crop avatars).
Also try reverting to the default theme.
The best way to tackle this problem is to narrow it down. Gona be tedious but this will likely identify the offending culprit.
In reply to: [Resolved] Show posts written by user on profileThe way I would show posts on a BuddyPress profile would be like this:
$args = array( 'author' => bp_displayed_user_id(), 'post_type' => 'post' ); query_posts( $args ); if ( have_posts() ) : while ( have_posts() ) : the_post(); // do something amazing endwhile; else: // no posts found so do something less amazing endif; wp_reset_postdata();In reply to: Avatar not cropping properlyWhich theme are you using? Also, do you know if you’re including jQuery more than once?
In reply to: Avatar not cropping properlyHave you modified the change-avatar template in any way?
In reply to: Enable BuddyPress to WordPress profile syncingSpent the last 30 minutes doing some digging and found an old thread with a detailed explanation from Boone:
https://buddypress.org/support/topic/please-help-me-understand-a-wordpressbp-feature/#post-97470As far as I can tell, two functions perform the ‘syncing’ of data
xprofile_sync_wp_profile()Syncs Xprofile data (nickname, first name and last name) to the standard built in WordPress profile data
xprofile_sync_bp_profile()Syncs the standard built in WordPress profile data to XProfile
That’s about it. Nothing exciting really, just two nice little housekeeping functions
In reply to: Enable BuddyPress to WordPress profile syncing@hnla – not quite sure I follow…?
In reply to: BP template hierarchy Codex articleWill keep that in mind, thanks @bphelp