{"id":26030,"date":"2022-08-19T10:15:42","date_gmt":"2022-08-19T14:15:42","guid":{"rendered":"https:\/\/plumrocket.com\/docs\/?p=26030"},"modified":"2022-08-19T10:15:44","modified_gmt":"2022-08-19T14:15:44","slug":"how-to-set-a-custom-location-for-a-user-profile-photo","status":"publish","type":"post","link":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location","title":{"rendered":"How to Set a Custom Location for a User Profile Photo"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">By default, <a href=\"\/magento-social-login-pro\">Magento 2 Social Login Pro extension<\/a> displays customer profile photos next to the username in the header. Please follow the guide below to manually set their custom location.<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-columns table-to-grid is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Changes to be made<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Customer photo on My Account page<\/strong><\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Go to the needed phtml file and insert the following code in the place where the customer&#8217;s profile photo from the social network should appear:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\" data-line=\"\">&lt;?php if ($photoPath = $this-&gt;helper(&#039;Plumrocket\\SocialLoginPro\\Helper\\Data&#039;)-&gt;getPhotoPath()) : ?&gt;\n&lt;img src=&quot;&lt;?php echo $photoPath; ?&gt;&quot; \/&gt;\n&lt;?php endif; ?&gt;<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><div class=\"example-block\">\r\n    <p class=\"example-block-title\">Code Example<\/p>\r\n\r\n    <p>Please paste the above code into the file:<\/p>\r\n\r\n    <div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-markup\" data-line=\"\">vendor\/magento\/module-theme\/view\/frontend\/templates\/html\/title.phtml<\/code><\/pre><\/div>\r\n    \r\n    <p>Result will be as follows:<\/p>\r\n\r\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre data-line=\"10-12\"><code class=\"language-php\" data-line=\"\">$cssClass = $block-&gt;getCssClass() ? &#039; &#039; . $block-&gt;getCssClass() : &#039;&#039;;\n    $title = &#039;&#039;;\n    if (trim($block-&gt;getPageHeading())) {\n    $title = &#039;&lt;span class=&quot;base&quot; data-ui-id=&quot;page-title-wrapper&quot; &#039; . $block-&gt;getAddBaseAttribute() . &#039;&gt;&#039;\n     . $block-&gt;escapeHtml($block-&gt;getPageHeading()) . &#039;&lt;\/span&gt;&#039;;\n    }\n    ?&gt;\n    &lt;?php if ($title): ?&gt;\n    \n    &lt;?php if ($photoPath = $this-&gt;helper(&#039;Plumrocket\\SocialLoginPro\\Helper\\Data&#039;)-&gt;getPhotoPath()) : ?&gt;\n    &lt;img src=&quot;&lt;?php echo $photoPath; ?&gt;&quot; \/&gt;\n    &lt;?php endif; ?&gt;\n    \n    &lt;div class=&quot;page-title-wrapper&lt;?php \/* @escapeNotVerified *\/ echo $cssClass; ?&gt;&quot;&gt;\n    &lt;h1 class=&quot;page-title&quot;\n     &lt;?php if ($block-&gt;getId()): ?&gt; id=&quot;&lt;?php \/* @escapeNotVerified *\/ echo $block-&gt;getId();?&gt;&quot; &lt;?php endif; ?&gt;\n     &lt;?php if ($block-&gt;getAddBaseAttributeAria()): ?&gt;\n     aria-labelledby=&quot;&lt;?php \/* @escapeNotVerified *\/ echo $block-&gt;getAddBaseAttributeAria(); ?&gt;&quot;\n     &lt;?php endif; ?&gt;&gt;\n     &lt;?php \/* @escapeNotVerified *\/ echo $title ?&gt;\n    &lt;\/h1&gt;\n    &lt;?php echo $block-&gt;getChildHtml(); ?&gt;\n    &lt;\/div&gt;\n    &lt;?php endif; ?&gt;<\/code><\/pre><\/div>\r\n<\/div><\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p class=\"wp-block-paragraph\">1. Social Login Pro buttons on the My Account page.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/wp-content\/uploads\/2020\/05\/1_developer_guide_facebook_twitter_1.jpg\" alt=\"Magento 2 social login developer guide\"\/><\/figure>\n<\/div><\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default, Magento 2 Social Login Pro extension displays customer profile photos next to the username in the header. Please follow the guide below to manually set their custom location. Changes to be made Customer photo on My Account page Go to the needed phtml file and insert the following code in the place where &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Set a Custom Location for a User Profile Photo&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[360],"tags":[],"class_list":["post-26030","post","type-post","status-publish","format-standard","hentry","category-magento-social-login-pro-v4-devguide","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Set a Custom Location for a User Profile Photo - Plumrocket Documentation<\/title>\n<meta name=\"description\" content=\"By default, Magento 2 Social Login Pro extension displays customer profile photos next to the username in the header. Please follow the guide below to\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Set a Custom Location for a User Profile Photo - Plumrocket Documentation\" \/>\n<meta property=\"og:description\" content=\"By default, Magento 2 Social Login Pro extension displays customer profile photos next to the username in the header. Please follow the guide below to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location\" \/>\n<meta property=\"og:site_name\" content=\"Plumrocket Documentation\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-19T14:15:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-19T14:15:44+00:00\" \/>\n<meta name=\"author\" content=\"Plumrocket\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Plumrocket\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Set a Custom Location for a User Profile Photo - Plumrocket Documentation","description":"By default, Magento 2 Social Login Pro extension displays customer profile photos next to the username in the header. Please follow the guide below to","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location","og_locale":"en_US","og_type":"article","og_title":"How to Set a Custom Location for a User Profile Photo - Plumrocket Documentation","og_description":"By default, Magento 2 Social Login Pro extension displays customer profile photos next to the username in the header. Please follow the guide below to","og_url":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location","og_site_name":"Plumrocket Documentation","article_published_time":"2022-08-19T14:15:42+00:00","article_modified_time":"2022-08-19T14:15:44+00:00","author":"Plumrocket","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Plumrocket","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location#article","isPartOf":{"@id":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location"},"author":{"name":"Plumrocket","@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/c96fccdb89342ae6804272265723eca8"},"headline":"How to Set a Custom Location for a User Profile Photo","datePublished":"2022-08-19T14:15:42+00:00","dateModified":"2022-08-19T14:15:44+00:00","mainEntityOfPage":{"@id":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location"},"wordCount":100,"articleSection":["Developer Guide"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location","url":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location","name":"How to Set a Custom Location for a User Profile Photo - Plumrocket Documentation","isPartOf":{"@id":"https:\/\/plumrocket.com\/docs\/#website"},"datePublished":"2022-08-19T14:15:42+00:00","dateModified":"2022-08-19T14:15:44+00:00","author":{"@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/c96fccdb89342ae6804272265723eca8"},"description":"By default, Magento 2 Social Login Pro extension displays customer profile photos next to the username in the header. Please follow the guide below to","breadcrumb":{"@id":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Magento 2 Extensions","item":"https:\/\/plumrocket.com\/magento-extensions"},{"@type":"ListItem","position":2,"name":"Magento 2 Social Login Pro","item":"https:\/\/plumrocket.com\/magento-social-login-pro"},{"@type":"ListItem","position":3,"name":"Documentation","item":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro"},{"@type":"ListItem","position":4,"name":"v4","item":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4"},{"@type":"ListItem","position":5,"name":"Developer Guide","item":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide"},{"@type":"ListItem","position":6,"name":"How to Set a Custom Location for a User Profile Photo"}]},{"@type":"WebSite","@id":"https:\/\/plumrocket.com\/docs\/#website","url":"https:\/\/plumrocket.com\/docs\/","name":"Plumrocket Documentation","description":"Extensions docs, troubleshootings etc.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/plumrocket.com\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/c96fccdb89342ae6804272265723eca8","name":"Plumrocket","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/30d7e8cb4567485b56880a1658849a1252ac12806e8f95b3be71e986bf5eabee?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/30d7e8cb4567485b56880a1658849a1252ac12806e8f95b3be71e986bf5eabee?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/30d7e8cb4567485b56880a1658849a1252ac12806e8f95b3be71e986bf5eabee?s=96&d=mm&r=g","caption":"Plumrocket"}}]}},"_links":{"self":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/26030","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/comments?post=26030"}],"version-history":[{"count":2,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/26030\/revisions"}],"predecessor-version":[{"id":26033,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/26030\/revisions\/26033"}],"wp:attachment":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/media?parent=26030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/categories?post=26030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/tags?post=26030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}