{"id":132112,"date":"2023-01-31T10:37:00","date_gmt":"2023-01-31T05:07:00","guid":{"rendered":"https:\/\/git-staging.wpastra.com\/?post_type=docs&#038;p=132112"},"modified":"2024-02-14T16:09:49","modified_gmt":"2024-02-14T10:39:49","slug":"change-logo-on-specific-pages","status":"publish","type":"docs","link":"https:\/\/git-staging.wpastra.com\/es\/docs\/change-logo-on-specific-pages\/","title":{"rendered":"\u00bfC\u00f3mo cambiar el logotipo en determinadas p\u00e1ginas?"},"content":{"rendered":"<p>Esta \u00fatil gu\u00eda le mostrar\u00e1 c\u00f3mo cambiar el logotipo habitual por su propio logotipo personalizado en determinadas p\u00e1ginas de su sitio web WordPress. Esta personalizaci\u00f3n puede hacer que tu sitio se vea mejor y ayudar con tu marca, dando a tus visitantes una experiencia especial.<\/p>\n\n\n\n<p>Antes de empezar, aseg\u00farate de que dispones de lo siguiente:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Un sitio web WordPress:<\/strong> Aseg\u00farese de que dispone de un sitio web WordPress activo.<\/li>\n\n\n\n<li><strong>Conocimientos b\u00e1sicos de PHP y desarrollo de temas para WordPress:<\/strong> Se valorar\u00e1n los conocimientos b\u00e1sicos de PHP y de desarrollo de temas para WordPress.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-132112-_iw2gkss9ilgh\"><\/a><strong>C\u00f3mo cambiar el logotipo de una p\u00e1gina espec\u00edfica<\/strong><\/h3>\n\n\n\n<p>Antes de realizar cualquier personalizaci\u00f3n, es recomendable crear un archivo <a href=\"https:\/\/git-staging.wpastra.com\/es\/docs\/install-astra-child-theme\/\">tema hijo para evitar que afecte al tema principal<\/a>. Si ya tienes un tema hijo, puedes saltarte este paso. Ahora, siga estos pasos para cambiar el logotipo en p\u00e1ginas espec\u00edficas:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Inicie sesi\u00f3n en su sitio web WordPress.<\/li>\n\n\n\n<li>Vaya a <strong>Apariencia &gt; Editor de temas.<\/strong><\/li>\n\n\n\n<li>Seleccione el tema hijo en el men\u00fa desplegable de la esquina superior derecha.<\/li>\n\n\n\n<li>Abre el `<strong>funciones.php<\/strong>` e Inserte el siguiente fragmento de c\u00f3digo al final del archivo. <\/li>\n\n\n\n<li>Despu\u00e9s de a\u00f1adir el c\u00f3digo, haga clic en \"<strong>Actualizar archivo<\/strong>\".<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\" data-no-auto-translation=\"\"><code>function custom_astra_logo_output($html) {\r\n\r\n    \/\/ Check if the current page has a specific slug (e.g., \"example-page\").\r\n    if (is_page('example-page')) {\r\n\r\n        \/\/ Replace this URL with the URL of the custom logo for the specific page.\r\n        $custom_logo_url = 'URL_OF_YOUR_CUSTOM_LOGO_FOR_THIS_PAGE';\r\n    } else {\r\n\r\n\r\n        \/\/ Get the default custom logo set in WordPress.\r\n        $custom_logo_id = get_theme_mod('custom_logo');\r\n        $custom_logo_url = wp_get_attachment_image_url($custom_logo_id, 'full');\r\n    }\r\n\r\n    \/\/ Customize the logo HTML output.\r\n    $html = sprintf(\r\n        '&lt;a href=\"%1$s\" class=\"custom-logo-link\" rel=\"home\" itemprop=\"url\">&lt;img src=\"%2$s\" class=\"custom-logo\" alt=\"%3$s\">&lt;\/a>',\r\n        esc_url(home_url('\/')),\r\n        esc_url($custom_logo_url),\r\n        esc_attr(get_bloginfo('name'))\r\n    );\r\n\r\n    return $html;\r\n}\r\n\r\nadd_filter('get_custom_logo', 'custom_astra_logo_output');<\/code><\/pre>\n\n\n\n<p>Este c\u00f3digo le permitir\u00e1 mostrar un logotipo personalizado en p\u00e1ginas espec\u00edficas. Aseg\u00farese de sustituir `<em>URL_DE_TU_LOGO_PERSONALIZADO_PARA_ESTA_PAGINA<\/em>` con la URL real del logotipo personalizado que desea mostrar en la p\u00e1gina espec\u00edfica. <\/p>\n\n\n\n<p>Por \u00faltimo, visite la p\u00e1gina espec\u00edfica (por ejemplo, \"p\u00e1gina de ejemplo\") de su sitio web para ver el logotipo personalizado. Las dem\u00e1s p\u00e1ginas deber\u00edan seguir mostrando el logotipo predeterminado.<\/p>\n\n\n\n<p>Esperamos que este documento le haya sido \u00fatil. No dude en dejarnos un comentario a continuaci\u00f3n si tiene alguna duda.<\/p>","protected":false},"excerpt":{"rendered":"<p>Esta \u00fatil gu\u00eda le mostrar\u00e1 c\u00f3mo cambiar el logotipo habitual por su propio logotipo personalizado en determinadas p\u00e1ginas de su sitio web WordPress. Esta personalizaci\u00f3n puede hacer que su sitio se vea mejor y ayudar con su marca, dando a sus visitantes una experiencia especial. Antes de empezar, aseg\u00farese de que tiene lo siguiente en su lugar: C\u00f3mo [...]<\/p>","protected":false},"author":86,"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":[103],"docs_tag":[],"class_list":{"0":"post-132112","1":"docs","2":"type-docs","3":"status-publish","5":"docs_category-custom-code-snippets"},"spectra_custom_meta":{"wp_last_modified_info":["December 12, 2022 @ 10:37 AM"],"wplmi_shortcode":["[lmt-post-modified-info]"],"_edit_lock":["1707907420:89"],"_wplmi_last_modified":["2022-09-06 12:47:18"],"rank_math_internal_links_processed":["1"],"views":["4881"],"helpful":["0"],"unhelpful":["4"],"redirects":["4"],"rank_math_seo_score":["13"],"_edit_last":["89"],"tap_disable_autolinker":["no"],"tap_autolink_inside_heading":["global"],"tap_autolink_random_placement":["global"],"tap_post_autolinker_limit":["0"],"rank_math_analytic_object_id":["1915"],"rank_math_primary_docs_category":["103"],"_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"],"_trp_automatically_translated_slug_es_ES":["como-cambiar-el-logotipo-en-determinadas-paginas"],"_wp_old_slug":["how-to-change-the-logo-on-specific-pages"],"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:7:{i:0;s:14:\"core\/paragraph\";i:1;s:9:\"core\/list\";i:2;s:14:\"core\/list-item\";i:3;s:12:\"core\/heading\";i:4;s:9:\"core\/code\";i:5;s:14:\"uagb\/container\";i:6;s:14:\"core\/shortcode\";}s:8:\"uag_flag\";b:1;s:11:\"uag_version\";s:10:\"1776527122\";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":"Arindam","author_link":"https:\/\/git-staging.wpastra.com\/es\/author\/arindamm\/"},"uagb_comment_info":0,"uagb_excerpt":"This helpful guide will show you how to change the regular logo to your own custom logo on certain pages of your WordPress website. This personalization can make your site look better and help with your brand, giving your visitors a special experience. Before you begin, make sure you have the following in place: How&hellip;","_links":{"self":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs\/132112"}],"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\/86"}],"replies":[{"embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/comments?post=132112"}],"version-history":[{"count":0,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs\/132112\/revisions"}],"wp:attachment":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/media?parent=132112"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs_category?post=132112"},{"taxonomy":"docs_tag","embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs_tag?post=132112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}