{"id":173233,"date":"2024-01-22T08:19:04","date_gmt":"2024-01-22T02:49:04","guid":{"rendered":"https:\/\/git-staging.wpastra.com\/?post_type=docs&#038;p=173233"},"modified":"2024-01-23T08:33:12","modified_gmt":"2024-01-23T03:03:12","slug":"customize-social-profile-links-for-authors","status":"publish","type":"docs","link":"https:\/\/git-staging.wpastra.com\/es\/docs\/customize-social-profile-links-for-authors\/","title":{"rendered":"Personalizaci\u00f3n de enlaces a perfiles sociales para autores individuales en entradas individuales"},"content":{"rendered":"<p>La opci\u00f3n del personalizador de Astra (Personalizador &gt; Blog &gt; Entrada individual &gt; Informaci\u00f3n del autor) permite establecer una \u00fanica URL social para los autores. Si bien esto funciona bien para sitios web de un solo autor, presenta un desaf\u00edo en escenarios de m\u00faltiples autores, ya que la URL establecida se aplica a todos los autores, independientemente de qui\u00e9n escribi\u00f3 el contenido. <\/p>\n\n\n\n<p>Para abordar esta limitaci\u00f3n y permitir perfiles de autor individualizados, se puede implementar un fragmento de c\u00f3digo espec\u00edfico. Este documento proporciona instrucciones detalladas sobre el uso del fragmento para asignar enlaces sociales \u00fanicos a cada autor.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Personalizar enlaces a perfiles sociales para autores individuales en entradas individuales<\/strong><\/h3>\n\n\n\n<p>Con el sencillo fragmento de c\u00f3digo que se adjunta a continuaci\u00f3n, puede desbloquear enlaces sociales espec\u00edficos para cada autor, lo que le permitir\u00e1 mostrar los enlaces de perfil social exclusivos de cada escritor junto a su obra. <\/p>\n\n\n\n<p>Puede a\u00f1adir el siguiente c\u00f3digo al archivo functions.php de su tema hijo<\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\" data-no-auto-translation=\"\"><code>add_filter( 'astra_addon_author_social_sharing_link', 'update_author_wise_social_links', 10, 2 );\r\n\r\nfunction update_author_wise_social_links( $social_link, $network ) {\r\n\r\n\tglobal $post;\r\n\t$post_author_id = ! empty( $post->post_author ) ? absint( $post->post_author ) : 1;\r\n\r\n\tswitch ( $network ) {\r\n\t\tcase 'facebook':\r\n\t\t\tif ( 43 === $post_author_id ) {\r\n\t\t\t\t$social_link = 'https:\/\/www.facebook.com\/astra-team'; \/\/ For author user id 43\r\n\t\t\t} elseif ( 4 === $post_author_id ) {\r\n\t\t\t\t$social_link = 'https:\/\/www.facebook.com\/admin'; \/\/ For author user id 4\r\n\t\t\t} else {\r\n\t\t\t\t$social_link = 'https:\/\/www.facebook.com\/brainstormforce'; \/\/ Fallback facebook social link\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\t\tcase 'twitter':\r\n\t\t\t$social_link = 'https:\/\/twitter.com\/bsfwp';\r\n\t\t\tbreak;\r\n\r\n\t\tcase 'linkedin':\r\n\t\t\t$social_link = 'https:\/\/www.linkedin.com\/company\/brainstorm-force\/';\r\n\t\t\tbreak;\r\n\r\n\t\tcase 'youtube':\r\n\t\t\t$social_link = 'https:\/\/www.youtube.com\/channel\/UCP6LzCTEr7ZKTuWzc9ZxVqw';\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\t\/\/ Do nothing or extend this case as per other social networks.\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\treturn $social_link;\r\n}<\/code><\/pre>\n\n\n\n<p>Puede actualizar los enlaces sociales de ejemplo con las URL reales de sus autores y ajustar los ID de autor para que coincidan con sus usuarios espec\u00edficos.<\/p>\n\n\n\n<p>En este ejemplo, el fragmento diferencia los enlaces de Facebook en funci\u00f3n del autor, proporcionando enlaces sociales \u00fanicos para cada autor, superando as\u00ed el problema de los enlaces sociales uniformes para varios autores.<\/p>\n\n\n\n<p>Esperamos que este documento le haya sido \u00fatil. Si tiene m\u00e1s preguntas, no dude en dejarnos un comentario a continuaci\u00f3n.<\/p>","protected":false},"excerpt":{"rendered":"<p>La opci\u00f3n del personalizador de Astra (Personalizador &gt; Blog &gt; Entrada individual &gt; Informaci\u00f3n del autor) permite establecer una \u00fanica URL social para los autores. Si bien esto funciona bien para sitios web de un solo autor, presenta un desaf\u00edo en escenarios de m\u00faltiples autores, ya que la URL establecida se aplica a todos los autores, independientemente de qui\u00e9n escribi\u00f3 el contenido. Para solucionar esta limitaci\u00f3n y permitir [...]<\/p>","protected":false},"author":89,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"docs_category":[2111],"docs_tag":[],"class_list":{"0":"post-173233","1":"docs","2":"type-docs","3":"status-publish","5":"docs_category-blog-filters"},"spectra_custom_meta":{"_edit_lock":["1706636495:109"],"rank_math_seo_score":["10"],"rank_math_internal_links_processed":["1"],"_uag_custom_page_level_css":[""],"ast-site-content-layout":["default"],"theme-transparent-header-meta":[""],"adv-header-id-meta":[""],"stick-header-meta":[""],"astra-migrate-meta-layouts":["set"],"_edit_last":["22"],"tap_disable_autolinker":["no"],"tap_autolink_inside_heading":["global"],"tap_autolink_random_placement":["global"],"tap_post_autolinker_limit":["0"],"_oembed_08a3dccdf4edc6483037ace2e6622f2e":["{{unknown}}"],"_oembed_6753403dc0be18ef08b86724ddc3a121":["<a class=\"twitter-timeline\" data-width=\"500\" data-height=\"750\" data-dnt=\"true\" href=\"https:\/\/twitter.com\/BSFWP?ref_src=twsrc%5Etfw\">Tweets by BSFWP<\/a><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>"],"_oembed_time_6753403dc0be18ef08b86724ddc3a121":["1705891770"],"_oembed_955d53ccff41f3dc22e0f9e64e63a831":["{{unknown}}"],"_oembed_a662e838bc14b82c42975c3ff311d8b4":["{{unknown}}"],"rank_math_primary_docs_category":["2111"],"views":["3018"],"_trp_automatically_translated_slug_es_ES":["personalizacion-de-enlaces-a-perfiles-sociales-de-autores-individuales-en-entradas-individuales"],"_oembed_1517d0cf381f5c4352713d687dc9ec4f":["{{unknown}}"],"_oembed_8542dec17d4915ebcc0d7ac9b2e6f251":["<a class=\"twitter-timeline\" data-width=\"1200\" data-height=\"1000\" data-dnt=\"true\" href=\"https:\/\/twitter.com\/BSFWP?ref_src=twsrc%5Etfw\">Tweets by BSFWP<\/a><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>"],"_oembed_time_8542dec17d4915ebcc0d7ac9b2e6f251":["1705891752"],"_oembed_9bea601bc578143120d8973a5c14866d":["{{unknown}}"],"_oembed_5879ea172f92c0e5da6618bb18017f34":["{{unknown}}"],"_wp_old_slug":["customizing-social-profile-links-for-individual-authors-in-single-posts"],"helpful":["3"],"unhelpful":["4"],"redirects":["0"],"pfd_related_docs":[""],"_uag_page_assets":["a:9:{s:3:\"css\";s:2495:\".wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape-top svg{width: calc( 100% + 1.3px );}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape.uagb-container__shape-top .uagb-container__shape-fill{fill: rgba(51,51,51,1);}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape-bottom svg{width: calc( 100% + 1.3px );}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__shape.uagb-container__shape-bottom .uagb-container__shape-fill{fill: rgba(51,51,51,1);}.wp-block-uagb-container.uagb-block-debf2792 .uagb-container__video-wrap video{opacity: 1;}.wp-block-uagb-container.uagb-is-root-container .uagb-block-debf2792{max-width: 100%;width: 100%;}.wp-block-uagb-container.uagb-is-root-container.alignfull.uagb-block-debf2792 > .uagb-container-inner-blocks-wrap{--inner-content-custom-width: min( 100%, 1200px);max-width: var(--inner-content-custom-width);width: 100%;flex-direction: column;align-items: center;justify-content: center;flex-wrap: nowrap;row-gap: 0px;column-gap: 0px;}.wp-block-uagb-container.uagb-block-debf2792{box-shadow: 0px 0px   #00000070 ;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;margin-top: 0px !important;margin-bottom: 0px !important;margin-left: 0px;margin-right: 0px;overflow: visible;border-color: inherit;row-gap: 0px;column-gap: 0px;}@media only screen and (max-width: 976px) {.wp-block-uagb-container.uagb-is-root-container .uagb-block-debf2792{width: 100%;}.wp-block-uagb-container.uagb-is-root-container.alignfull.uagb-block-debf2792 > .uagb-container-inner-blocks-wrap{--inner-content-custom-width: min( 100%, 1024px);max-width: var(--inner-content-custom-width);width: 100%;}.wp-block-uagb-container.uagb-block-debf2792{padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;margin-top: 0px !important;margin-bottom: 0px !important;margin-left: 0px;margin-right: 0px;}}@media only screen and (max-width: 767px) {.wp-block-uagb-container.uagb-is-root-container .uagb-block-debf2792{max-width: 100%;width: 100%;}.wp-block-uagb-container.uagb-is-root-container.alignfull.uagb-block-debf2792 > .uagb-container-inner-blocks-wrap{--inner-content-custom-width: min( 100%, 767px);max-width: var(--inner-content-custom-width);width: 100%;flex-wrap: wrap;}.wp-block-uagb-container.uagb-block-debf2792{padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;margin-top: 0px !important;margin-bottom: 0px !important;margin-left: 0px;margin-right: 0px;}}\";s:2:\"js\";s:0:\"\";s:18:\"current_block_list\";a:5:{i:0;s:14:\"core\/paragraph\";i:1;s:12:\"core\/heading\";i:2;s:9:\"core\/code\";i:3;s:14:\"uagb\/container\";i:4;s:14:\"core\/shortcode\";}s:8:\"uag_flag\";b:1;s:11:\"uag_version\";s:10:\"1777381901\";s:6:\"gfonts\";a:0:{}s:10:\"gfonts_url\";s:0:\"\";s:12:\"gfonts_files\";a:0:{}s:14:\"uag_faq_layout\";b:0;}"]},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"trp-custom-language-flag":false},"uagb_author_info":{"display_name":"mounikak","author_link":"https:\/\/git-staging.wpastra.com\/es\/author\/mounikak\/"},"uagb_comment_info":0,"uagb_excerpt":"Astra&#8217;s customizer option (Customizer &gt; Blog &gt; Single Post &gt; Author Info) allows setting a single social URL for authors. While this works well for single author websites, it presents a challenge in multi-author scenarios, as the set URL applies to all authors, regardless of who wrote the content. To address this limitation and enable&hellip;","_links":{"self":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs\/173233"}],"collection":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/users\/89"}],"replies":[{"embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/comments?post=173233"}],"version-history":[{"count":0,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs\/173233\/revisions"}],"wp:attachment":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/media?parent=173233"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs_category?post=173233"},{"taxonomy":"docs_tag","embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs_tag?post=173233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}