Custom template overwrites edit profile page
-
Hi,
I have created a custom profile template for a client and when we go to the edit profile URL, it goes to the custom template and not an edit page.
Is there a way to make a custom edit page?
Viewing 4 replies - 1 through 4 (of 4 total)
-
Hi @raesitka
Did you mean to create a separate template for “Profile View” and “Edit View”?
Hi – maybe.
I have a custom page template created for the profile view, but when we. go to the edit URL, it brings us to the profile view page and we are unable to edit the fields.
Hi @raesitka
Could you please share the Custom Profile Template file here so we can review the code? Please enclose the code with the “CODE” in the reply form to format it when you submit it here.
Here is the custom template, which is how we want profiles to show for users.
<?php /* Template: Profile 4 */ if ( ! defined( 'ABSPATH' ) ) exit; ?> <div class="member-profile"> <div class="top-profile"> <div class="container"> <div class="profile-left"> <div class="member-photo"><?php echo get_avatar( um_user( 'ID' ), 168 ); ?> </div> <div class="member-details-right"> <p class="join-date"> Joined <?php $year_joined = um_user('year_joined'); echo esc_attr( $year_joined ); // prints the user's joined year ?> </p> <p class="member-name"> <?php $display_name = um_user('display_name'); echo esc_attr( $display_name ); // prints the user's display name ?> </p> <p class="member-title"> <?php $job_title = um_user('job_title'); echo esc_attr( $job_title ); // prints the user's job title ?> </p> <?php $user_company = um_user('user_company'); if( $user_company): ?> <p class="member-company"> <?php $user_company = um_user('user_company'); echo esc_attr( $user_company ); // prints the user's company name ?> </p><?php endif; ?> <p class="wf-board"> </p> </div> <div class="member-details-below"> <p class="p-address"><b>Address : </b> </p> <?php $user_industry = um_user('user_industry'); if( $user_industry): ?> <p class="p-industry"> <b>Industry : </b><?php $user_industry = um_user('industry'); echo esc_attr( $user_industry ); // prints the user's industry ?> </p><?php endif; ?> <?php $user_profession = um_user('user_profession'); if( $user_profession): ?> <p class="p-profession"> <b>Profession : </b><?php $user_profession = um_user('profession'); echo esc_attr( $user_profession ); // prints the user's profession ?> </p><?php endif; ?> </div> </div> <div class="profile-right"> <div class="social_media_links"> <?php $facebook = um_user('facebook'); if( $facebook ): ?> <p><strong>Social Media :</strong></p> <a href="<?php $facebook = um_user('facebook'); echo esc_attr( $facebook ); // prints the user's business number ?>"><i class="fa-brands fa-facebook-f"></i></a> <?php endif; ?> <?php $linkedin = um_user('linkedin'); if( $linkedin ): ?> <a href="<?php $linkedin = um_user('linkedin'); echo esc_attr( $linkedin ); // prints the user's business number ?>"><i class="fa-brands fa-linkedin"></i></a> <?php endif; ?> <?php $twitter = um_user('twitter'); if( $twitter ): ?> <a href="<?php $twitter = um_user(twitter); echo esc_attr( $twitter ); // prints the user's business number ?>"><i class="fa-brands fa-twitter"></i></a> <?php endif; ?> <?php $Blog = um_user('Blog'); if( $Blog ): ?> <a href="<?php $Blog = um_user(Blog); echo esc_attr( $Blog ); // prints the user's business number ?>"><i class="fa-solid fa-rss"></i></a> <?php endif; ?> <?php $wiki = um_user('wiki'); if( $wiki): ?> <a href="<?php $wiki = um_user(wiki); echo esc_attr( $wiki ); // prints the user's business number ?>"><i class="fa-brands fa-wikipedia-w"></i></a> <?php endif; ?> </div> <div class="personal_website col_d"> <?php $website = um_user('website'); if( $website): ?> <p><strong>Website :</strong><br> <a href="<?php $website = um_user('website'); echo esc_attr( $website ); // prints the user's website ?>"><?php $website = um_user('website'); echo esc_attr( $website ); // prints the user's website ?></a></p> <?php endif; ?> </div> <div class="email col_d"> <?php $user_email = um_user('user_email'); if( $user_email): ?> <p><strong>Preferred Email :</strong><br> <a href="mailto:<?php $user_email = um_user('user_email'); echo esc_attr( $user_email ); // prints the user's email ?>"><?php $user_email = um_user('user_email'); echo esc_attr( $user_email ); // prints the user's email ?></a></p> <?php endif; ?> </div> <div class="business_phone col_d"> <?php $business_phone_1 = um_user('business_phone_1'); if( $business_phone_1): ?> <p><strong>Business Phone :</strong><br> <a href="tel:<?php $business_phone_1 = um_user('business_phone_1'); echo esc_attr( $business_phone_1 ); // prints the user's business number ?>"><?php $business_phone_1 = um_user('business_phone_1'); echo esc_attr( $business_phone_1 ); // prints the user's business number ?></a></p> <?php endif; ?> </div> <div class="mobile_1 col_d"> <?php $mobile_number = um_user('mobile_number'); if( $mobile_number): ?> <p><strong>Cellphone :</strong><br> <a href="tel:<?php $mobile_number = um_user('mobile_number'); echo esc_attr( $mobile_number ); // prints the user's mobile number ?>"><?php $mobile_number = um_user('mobile_number'); echo esc_attr( $mobile_number ); // prints the user's mobile number ?></a></p> <?php endif; ?> </div> <div class="mobile_phone_2 col_d"> <?php $home_phone_1 = um_user('home_phone_1'); if( $home_phone_1): ?> <p><strong>Home Phone :</strong><br> <a href="tel:<?php $home_phone_1 = um_user('home_phone_1'); echo esc_attr( $home_phone_1 ); // prints the user's home number ?>"><?php $home_phone_1 = um_user('home_phone_1'); echo esc_attr( $home_phone_1); // prints the user's home number ?></a></p> <?php endif; ?> </div> </div> </div></div> <div class="container"> <div class="body-profile"> <div class="member-bio"> <h4>Bio</h4> <?php $members_directory_bio = um_user('members_directory_bio'); echo esc_attr( $members_directory_bio ); // prints the user's bio ?> </div> <?php $spouse_significant_other = um_user('spouse_significant_other'); if( $spouse_significant_other): ?> <div class="member-spouse"> <div class="left-aligned-title"> <strong>Spouse/Significant Other : </strong> </div> <div class="right-aligned-detail"> <p><?php $spouse_significant_other = um_user('spouse_significant_other'); echo esc_attr( $spouse_significant_other ); // prints the user's spouse or significant other ?></p> </div> </div> <?php endif; ?> <div class="education"> <h4>Education Information</h4> <div class="left-aligned-title"> <?php $undergrad = um_user('undergrad'); if( $undergrad): ?> <strong>Undergraduate College (Degree) : </strong> </div> <div class="right-aligned-detail"> <p> <?php $undergrad= um_user('undergrad'); echo esc_attr( $undergrad); // prints the user's undergrad school ?> <?php endif; ?> <?php $undergraduate_degree = um_user('undergraduate_degree'); if( $undergraduate_degree): ?> (<?php $undergraduate_degree = um_user('undergraduate_degree'); echo esc_attr( $undergraduate_degree ); // prints the user's unsergrad degree ?>)</p> </div> </div> <?php endif; ?> <div class="board-affiliations"> <h4>Board Affiliations</h4> <div class="corp-boards"> <div class="left-aligned-title"> <?php $undergrad = um_user('undergrad'); if( $undergrad): ?> <strong>Corporate Boards : </strong> </div> <div class="right-aligned-detail"> <p> <?php $undergrad= um_user('undergrad'); echo esc_attr( $undergrad ); // prints the user's undergrad school ?> <?php endif; ?> <?php $undergraduate_degree = um_user('undergraduate_degree'); if( $undergraduate_degree): ?> (<?php $undergraduate_degree = um_user('undergraduate_degree'); echo esc_attr( $undergraduate_degree); // prints the user's unsergrad degree ?>)</p> </div> </div> <?php endif; ?> </div> <div class="non-profit"> <div class="left-aligned-title"> <?php $undergrad = um_user('undergrad'); if( $undergrad): ?> <strong>Non-profit Boards : </strong> </div> <div class="right-aligned-detail"> <p> <?php $undergrad= um_user('undergrad'); echo esc_attr( $undergrad ); // prints the user's undergrad school ?> <?php endif; ?> <?php $undergraduate_degree = um_user('undergraduate_degree'); if( $undergraduate_degree): ?> (<?php $undergraduate_degree = um_user('undergraduate_degree'); echo esc_attr( $undergraduate_degree ); // prints the user's unsergrad degree ?>)</p> </div> <?php endif; ?> </div> <div class="affil"> <div class="left-aligned-title"> <?php $undergrad = um_user('undergrad'); if( $undergrad): ?> <strong>Affiliatons / Membership : </strong> </div> <div class="right-aligned-detail"> <p> <?php $undergrad= um_user('undergrad'); echo esc_attr( $undergrad ); // prints the user's undergrad school ?> <?php endif; ?> <?php $undergraduate_degree = um_user('undergraduate_degree'); if( $undergraduate_degree): ?> (<?php $undergraduate_degree = um_user('undergraduate_degree'); echo esc_attr( $undergraduate_degree ); // prints the user's unsergrad degree ?>)</p> </div> </div> <?php endif; ?> <div class="honors-awards"> <h4>Honors / Awards</h4> <div class="corp-boards"> <div class="left-aligned-title"> <?php $undergrad = um_user('undergrad'); if( $undergrad): ?> <strong>Honors / Awards : </strong> </div> <div class="right-aligned-detail"> <p> <?php $undergrad= um_user('undergrad'); echo esc_attr( $undergrad ); // prints the user's undergrad school ?> <?php endif; ?> <?php $undergraduate_degree = um_user('undergraduate_degree'); if( $undergraduate_degree): ?> (<?php $undergraduate_degree = um_user('undergraduate_degree'); echo esc_attr( $undergraduate_degree ); // prints the user's unsergrad degree ?>)</p> </div> </div> <?php endif; ?> </div> </div></div> <div class="container"> <div class="search"> <a href="/members-only/members-directory" target="" class="cta_back"> <svg xmlns="https://www.w3.org/2000/svg" width="21" height="14" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M9.375 233.4l128-128c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L109.3 224H480c17.69 0 32 14.31 32 32s-14.31 32-32 32H109.3l73.38 73.38c12.5 12.5 12.5 32.75 0 45.25c-12.49 12.49-32.74 12.51-45.25 0l-128-128C-3.125 266.1-3.125 245.9 9.375 233.4z"/></svg> New search</a> </div> </div> </div>
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Custom template overwrites edit profile page’ is closed to new replies.