-
Author
-
October 9, 2013 at 23:18 #4092jward2090Participant
Hi,
This is a fairly complicated question. I have a profile field that I want users to fill out and then on their profile a button is displayed like this:
COPY CODEadd_action('kleo_bp_after_profile_name', 'my_profile_button'); function my_profile_button() { echo '<a href="#" rel="nofollow">Some Text</a>'; }
I need to make a specific profile field show up in the href=”#” spot. I tried doing this but it “broke” my theme:
COPY CODEadd_action('kleo_bp_after_profile_name', 'my_profile_button'); function my_profile_button() { echo '<a>">Some Text</a>'; }
Basically I need to change the link to whatever the user inputs in the profile field. Do you know a way to do this? If you want I can reply with the specific profile field I need added into the href=”#” spot, but I need it to be private.
Thanks!
October 9, 2013 at 23:34 #4093jward2090ParticipantFor some reason I can’t edit my post. I used code and it didn’t display right…I had to take out the anchor tags and just replaced theme with “a” and “/a”. Here’s my edited post:
Hi,
This is a fairly complicated question. I have a profile field that I want users to fill out and then on their profile a button is displayed like this:
add_action(‘kleo_bp_after_profile_name’, ‘my_profile_button’);
function my_profile_button()
{
echo ‘a href=”#” class=”success button radius show-for-small” rel=”nofollow” My button’ /a ;
}I need to make a specific profile field show up in the href=”#” spot. I tried doing this but it “broke” my theme:
add_action(‘kleo_bp_after_profile_name’, ‘my_profile_button’);
function my_profile_button()
{
echo ‘ a id=”link” href=”<?php echo $_POST[‘field’];?>”>My button /a’;
}
}Basically I need to change the link to whatever the user inputs in the profile field. Do you know a way to do this? If you want I can reply with the specific profile field I need added into the href=”#” spot, but I need it to be private.
Thanks!
October 11, 2013 at 00:12 #4146SQadminKeymasterTo add code here just wrap it in a “pre” tag.
Inside the href you need to put this php function to get the field value by field name :
bp_get_member_profile_data( ‘field=the field name’ );Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 11, 2013 at 11:00 #4181SQadminKeymasterIt is the field name…. just like it appears. I don’t understand your question
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.