{"id":77,"date":"2016-12-19T22:15:51","date_gmt":"2016-12-19T22:15:51","guid":{"rendered":"http:\/\/docs.generatepress.com\/?post_type=kp_articles&p=77"},"modified":"2018-11-24T21:08:01","modified_gmt":"2018-11-24T21:08:01","slug":"adding-header-logo","status":"publish","type":"keep_articles","link":"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/","title":{"rendered":"Adding a Logo\/Header"},"content":{"rendered":"\n

You can upload an image inside your header, typically referred to as a logo or header by going to “Appearance > Customize > Site Identity”.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Then upload your header\/logo using the Logo control.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n
\"\"<\/figure>\n\n\n\n

If you have a regular logo uploaded, you’ll see an option to upload a retina logo. This method uses srcset to show your retina logo on screens that support it.
<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Starting in GeneratePress 2.2, you can also set the width of the logo using the slider.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

You also have the option to add the site icon. Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps.
<\/p>\n\n\n\n

Changing the logo under specific conditions<\/h3>\n\n\n\n

In some cases, you might need to upload a different logo on a specific page\/template. This option is built into our Page Header meta box, but can be changed using a filter as well.<\/p>\n\n\n\n

For example, if we wanted a different logo on our About page, with about as our URL slug:<\/p>\n\n\n\n

add_filter( 'generate_logo','tu_custom_about_logo' );\nfunction tu_custom_about_logo( $logo )\n{\n \t\/\/ If we are on the about page, set our custom logo\n \tif ( is_page( 'about' ) )\n \t \treturn 'URL TO OUR LOGO IN HERE';\n\n \t\/\/ Or else, set the regular logo\n \treturn $logo;\n\n }<\/pre>\n\n\n\n

You can use any of the available  WordPress conditionals<\/a> to determine your sidebar layout.<\/p>\n\n\n\n

Learn how to add PHP here<\/a>.<\/p>\n","protected":false},"template":"","yoast_head":"\nAdding a Logo\/Header - Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Adding a Logo\/Header - Documentation\" \/>\n<meta property=\"og:description\" content=\"You can upload an image inside your header, typically referred to as a logo or header by going to “Appearance > Customize > Site Identity”. Then upload your header\/logo using the Logo control. If you have a regular logo uploaded, you’ll see an option to upload a retina logo. This method uses srcset to show […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/\" \/>\n<meta property=\"og:site_name\" content=\"Documentation\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GeneratePress\" \/>\n<meta property=\"article:modified_time\" content=\"2018-11-24T21:08:01+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/docs.generatepress.com\/wp-content\/uploads\/2016\/12\/site-identity.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@GeneratePress\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/\",\"url\":\"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/\",\"name\":\"Adding a Logo\/Header - Documentation\",\"isPartOf\":{\"@id\":\"https:\/\/docs.generatepress.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/docs.generatepress.com\/wp-content\/uploads\/2016\/12\/site-identity.png\",\"datePublished\":\"2016-12-19T22:15:51+00:00\",\"dateModified\":\"2018-11-24T21:08:01+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/#primaryimage\",\"url\":\"http:\/\/docs.generatepress.com\/wp-content\/uploads\/2016\/12\/site-identity.png\",\"contentUrl\":\"http:\/\/docs.generatepress.com\/wp-content\/uploads\/2016\/12\/site-identity.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/docs.generatepress.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Articles\",\"item\":\"https:\/\/docs.generatepress.com\/article\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Adding a Logo\/Header\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/docs.generatepress.com\/#website\",\"url\":\"https:\/\/docs.generatepress.com\/\",\"name\":\"Documentation\",\"description\":\"Get to Know GeneratePress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/docs.generatepress.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"}]}<\/script>\n","yoast_head_json":{"title":"Adding a Logo\/Header - Documentation","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:\/\/docs.generatepress.com\/article\/adding-header-logo\/","og_locale":"en_US","og_type":"article","og_title":"Adding a Logo\/Header - Documentation","og_description":"You can upload an image inside your header, typically referred to as a logo or header by going to “Appearance > Customize > Site Identity”. Then upload your header\/logo using the Logo control. If you have a regular logo uploaded, you’ll see an option to upload a retina logo. This method uses srcset to show […]","og_url":"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/","og_site_name":"Documentation","article_publisher":"https:\/\/www.facebook.com\/GeneratePress","article_modified_time":"2018-11-24T21:08:01+00:00","og_image":[{"url":"http:\/\/docs.generatepress.com\/wp-content\/uploads\/2016\/12\/site-identity.png"}],"twitter_card":"summary_large_image","twitter_site":"@GeneratePress","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/","url":"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/","name":"Adding a Logo\/Header - Documentation","isPartOf":{"@id":"https:\/\/docs.generatepress.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/#primaryimage"},"image":{"@id":"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/#primaryimage"},"thumbnailUrl":"http:\/\/docs.generatepress.com\/wp-content\/uploads\/2016\/12\/site-identity.png","datePublished":"2016-12-19T22:15:51+00:00","dateModified":"2018-11-24T21:08:01+00:00","breadcrumb":{"@id":"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/docs.generatepress.com\/article\/adding-header-logo\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/#primaryimage","url":"http:\/\/docs.generatepress.com\/wp-content\/uploads\/2016\/12\/site-identity.png","contentUrl":"http:\/\/docs.generatepress.com\/wp-content\/uploads\/2016\/12\/site-identity.png"},{"@type":"BreadcrumbList","@id":"https:\/\/docs.generatepress.com\/article\/adding-header-logo\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/docs.generatepress.com\/"},{"@type":"ListItem","position":2,"name":"Articles","item":"https:\/\/docs.generatepress.com\/article\/"},{"@type":"ListItem","position":3,"name":"Adding a Logo\/Header"}]},{"@type":"WebSite","@id":"https:\/\/docs.generatepress.com\/#website","url":"https:\/\/docs.generatepress.com\/","name":"Documentation","description":"Get to Know GeneratePress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/docs.generatepress.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/docs.generatepress.com\/wp-json\/wp\/v2\/keep-api\/77"}],"collection":[{"href":"https:\/\/docs.generatepress.com\/wp-json\/wp\/v2\/keep-api"}],"about":[{"href":"https:\/\/docs.generatepress.com\/wp-json\/wp\/v2\/types\/keep_articles"}],"wp:attachment":[{"href":"https:\/\/docs.generatepress.com\/wp-json\/wp\/v2\/media?parent=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}