{"id":8647,"date":"2023-07-06T09:38:04","date_gmt":"2023-07-06T06:38:04","guid":{"rendered":"https:\/\/creativethemes.com\/blocksy\/?post_type=documentation&amp;p=7319"},"modified":"2023-07-06T09:38:04","modified_gmt":"2023-07-06T06:38:04","slug":"add-a-custom-social-network-to-the-author-box","status":"publish","type":"documentation","link":"https:\/\/creativethemes.com\/blocksy\/docs\/code-snippets\/add-a-custom-social-network-to-the-author-box\/","title":{"rendered":"Add a custom social network to the Author Box"},"content":{"rendered":"\n<p>This filter lets you add a custom social network to the <strong>Author Box<\/strong> space that can be found inside of <a href=\"https:\/\/creativethemes.com\/blocksy\/docs\/post-types\/single-posts\/\" data-type=\"URL\" data-id=\"https:\/\/creativethemes.com\/blocksy\/docs\/post-types\/single-posts\/\" target=\"_blank\" rel=\"noreferrer noopener\">single post pages<\/a>. An example can be seen below, where you just need to change the ID, name and SVG icon.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_filter('blocksy:author-profile:custom-social-network', function ($networks) {\n    $networks&#091;] = &#091;\n        'id' =&gt; 'test',\n        'name' =&gt; __('Test', 'blocksy'),\n        'icon' =&gt; ' &lt;svg\n          class=\"ct-icon\"\n          width=\"20px\"\n          height=\"20px\"\n          viewBox=\"0 0 20 20\"&gt;\n            &lt;path d=\"M20,10.1c0-5.5-4.5-10-10-10S0,4.5,0,10.1c0,5,3.7,9.1,8.4,9.9v-7H5.9v-2.9h2.5V7.9C8.4,5.4,9.9,4,12.2,4c1.1,0,2.2,0.2,2.2,0.2v2.5h-1.3c-1.2,0-1.6,0.8-1.6,1.6v1.9h2.8L13.9,13h-2.3v7C16.3,19.2,20,15.1,20,10.1z\"\/&gt;\n        &lt;\/svg&gt;',\n    ];\n\n    return $networks;\n}, 50);<\/code><\/pre>\n\n\n\n<p>Once that has been implemented, a new field will appear under <strong>Users -&gt; Profile<\/strong>, just like this &#8211;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-06-at-09.41.10.png\" alt=\"\" class=\"wp-image-7323\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>This filter lets you add a custom social network to the Author Box space that can be found inside of single post pages. An example can be seen below, where you just need to change the ID, name and SVG icon. Once that has been implemented, a new field will appear under Users -&gt; Profile, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"doc_categories":[125],"class_list":["post-8647","documentation","type-documentation","status-publish","hentry","doc_categories-code-snippets"],"blocksy_meta":[],"acf":[],"_links":{"self":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/8647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation"}],"about":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/types\/documentation"}],"author":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/comments?post=8647"}],"version-history":[{"count":0,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/8647\/revisions"}],"wp:attachment":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/media?parent=8647"}],"wp:term":[{"taxonomy":"doc_categories","embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/doc_categories?post=8647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}