{"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>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\">\n<div class=\"wp-block-columns table-to-grid\">\n<div class=\"wp-block-column\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<p>Changes to be made<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<p><strong>Customer photo on My Account page<\/strong><\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<p>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\">&lt;?php if ($photoPath = $this->helper('Plumrocket\\SocialLoginPro\\Helper\\Data')->getPhotoPath()) : ?>\n&lt;img src=\"&lt;?php echo $photoPath; ?>\" \/>\n&lt;?php endif; ?><\/code><\/pre><\/div>\n\n\n\n<p><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\">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\">$cssClass = $block-&gt;getCssClass() ? ' ' . $block-&gt;getCssClass() : '';\n    $title = '';\n    if (trim($block-&gt;getPageHeading())) {\n    $title = '&lt;span class=\"base\" data-ui-id=\"page-title-wrapper\" ' . $block-&gt;getAddBaseAttribute() . '&gt;'\n     . $block-&gt;escapeHtml($block-&gt;getPageHeading()) . '&lt;\/span&gt;';\n    }\n    ?&gt;\n    &lt;?php if ($title): ?&gt;\n    \n    &lt;?php if ($photoPath = $this-&gt;helper('Plumrocket\\SocialLoginPro\\Helper\\Data')-&gt;getPhotoPath()) : ?&gt;\n    &lt;img src=\"&lt;?php echo $photoPath; ?&gt;\" \/&gt;\n    &lt;?php endif; ?&gt;\n    \n    &lt;div class=\"page-title-wrapper&lt;?php \/* @escapeNotVerified *\/ echo $cssClass; ?&gt;\"&gt;\n    &lt;h1 class=\"page-title\"\n     &lt;?php if ($block-&gt;getId()): ?&gt; id=\"&lt;?php \/* @escapeNotVerified *\/ echo $block-&gt;getId();?&gt;\" &lt;?php endif; ?&gt;\n     &lt;?php if ($block-&gt;getAddBaseAttributeAria()): ?&gt;\n     aria-labelledby=\"&lt;?php \/* @escapeNotVerified *\/ echo $block-&gt;getAddBaseAttributeAria(); ?&gt;\"\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\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<p>1. Social Login Pro buttons on the My Account page.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img 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><\/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.<\/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,"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[360],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v17.2 (Yoast SEO v17.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\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\" \/>\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 property=\"og:image\" content=\"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2020\/05\/1_developer_guide_facebook_twitter_1.jpg\" \/>\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 Premium 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","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","og_image":[{"url":"https:\/\/plumrocket.com\/docs\/wp-content\/uploads\/2020\/05\/1_developer_guide_facebook_twitter_1.jpg"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"Plumrocket","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@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":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location#primaryimage","inLanguage":"en-US","url":"\/docs\/wp-content\/uploads\/2020\/05\/1_developer_guide_facebook_twitter_1.jpg","contentUrl":"\/docs\/wp-content\/uploads\/2020\/05\/1_developer_guide_facebook_twitter_1.jpg"},{"@type":"WebPage","@id":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location#webpage","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"},"primaryImageOfPage":{"@id":"https:\/\/plumrocket.com\/docs\/magento-social-login-pro\/v4\/devguide\/profile-photo-location#primaryimage"},"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":"Person","@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/c96fccdb89342ae6804272265723eca8","name":"Plumrocket","image":{"@type":"ImageObject","@id":"https:\/\/plumrocket.com\/docs\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/10c44aa45aab391250913d982e552e53?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/10c44aa45aab391250913d982e552e53?s=96&d=mm&r=g","caption":"Plumrocket"}}]}},"_links":{"self":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/26030"}],"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}]}}