Skip to:
Content
Pages
Categories
Search
Top
Bottom

Modifying the HTML for Each of the Member’s Profile Pages


  • otty-dev
    Participant

    @ottiya

    I’m trying to modify the profile pages for the members, but I’m having trouble locating the HTML file that I need to edit via the WordPress dashboard’s appearance > plugin > editor. I realize that it must be somewhere in the parent theme, but can someone help me identify where that is? Thanks so much!

Viewing 6 replies - 1 through 6 (of 6 total)

  • Paul Gibbs
    Keymaster

    @djpaul

    Hi @ottiya

    Good question, but the answer’s hard. You’ll need to learn how to modify WordPress theme templates. Start reading through all the linked pages on https://codex.buddypress.org/themes/ and when you have a specific question after you’ve made a try, let me know.


    otty-dev
    Participant

    @ottiya

    Thanks for your reply @djpaul, really appreciated. I’ve been working on this for the past four months and I tried to outsource this to a freelancer, but it did not go well.

    I’ve read the page you’ve sent several times now, but I’m still unsure how to find the HTML to for example the following from the member/profile page:

    1) move <h1 class=”entry-title”>Ottiya</h1> under the avatar (for each profile page for all members)
    2) add profile base info right underneath the .entry-title (for each profile page for all members)
    3) the “follow” button is missing on the profile page and needs to be added. It’s currently only available here (for each profile page for all members)


    mastershas
    Participant

    @mastershas

    Hi @ottiya
    If you want to play with the HTML of the Buddypress members, you will have to look at the Buddypress directory located in your child theme. As I can see from your source code, you are using child theme of weta (weta-child).

    1. Login to your web server (web host) and browse the files
    2. Go to your website directory and navigate to wp-content > themes > weta-child
    3. If you find a directory named buddypress. You can go inside and start editing the templates. As @djpaul suggested the article, you can start editing the files accordingly.

    Your questions are related to editing the member profile cover section. You can go to directory buddypress > members > single > cover-image-header.php of your child theme and edit.
    Thanks


    otty-dev
    Participant

    @ottiya

    Hi @mastershas thanks for your suggestion. I’ll try this out. I was also wondering how I could modify the author bio at the end of each blog post to show the bio from the buddypress profile page (this was based on your other thread).


    otty-dev
    Participant

    @ottiya

    @mastershas and @djpaul

    I was trying this for four hours yesterday with a developer highly experienced in php (but no experience with buddypress) and we weren’t able to get anywhere :S

    I created a directory on my child theme folder: buddypress > members > single > cover cover-image-header.php (did this here)

    tried to add for example to display Name + 15 word bio under <div id="item-header-content">:

    <?php $name = xprofile_get_field_data('Name' , bp_displayed_user_id()); ?>
    			<p class="user-nicename"> <input type="text" id="ht_user_name_box" value=""> </p>
    			<p class="user-nicename" id="ht_user_name"><?php echo (!empty($name) ? $name : bp_displayed_user_mentionname()); ?></p>
    		<?php endif; ?>
    		<?php $desc = xprofile_get_field_data('Your Bio in less 15 words or less' , bp_displayed_user_id()); ?>

    to add the follow button:

    	<?php }else{?>
    <div class="follow_button">
    		<div class="follow_icon">
    		 			<?php
              $args = array('leader_id' => bp_displayed_user_id(), 'follower_id' => bp_loggedin_user_id(),);
              echo bp_follow_get_add_follow_button($args);
              ?>
    		</div>
    	</div><div class="clear_follow"></div>
    	<?php }?>

    None of the code seems to be showing up on the test subdomain


    mastershas
    Participant

    @mastershas

    Hi @ottiya
    I am sorry to hear the same. I saw the test site and just wanted to recheck a few questions.
    1. In the directory path buddypress > members > single > cover cover-image-header.php, did you created cover-imgae-header.php in the cover directory or under single directory. It should be under single directory.
    2. I think you have not enabled allowing user to upload cover image. Could you please check and confirm ?
    If the same is not enabled you can edit member-header.php under buddypress > members > single.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar