Tagged: x
-
AuthorPosts
-
August 2, 2016 at 8:44 am #1113768
Hey Guys,
I’m trying to make a 2 pages in a different color scheme (BLACK), for this, the logo has to change because it would otherwise submerge in the blackness.
I’ve used to code provide here: https://community.theme.co/forums/topic/logo-change-for-a-specific-page/
But changed it to this:
<?php // ============================================================================= // VIEWS/GLOBAL/_BRAND.PHP // ----------------------------------------------------------------------------- // Outputs the brand. // ============================================================================= $site_name = get_bloginfo( 'name' ); $site_description = get_bloginfo( 'description' ); $logo = x_make_protocol_relative( x_get_option( 'x_logo' ) ); $site_logo = '<img src="' . $logo . '" alt="' . $site_description . '" />'; if ( is_page(‘hardstyle-mixing’) ) { $site_logo = '<img src="https://whiteseastudio.com/wp-content/uploads/2016/08/White-Sea-Logo-front-WHITE.png" alt="Logo" />'; } ?> <?php echo ( is_front_page() ) ? '<h1 class="visually-hidden">' . $site_name . '</h1>' : ''; ?> <a class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>"> <?php echo ( $logo == ‘’ && !is_page(‘hardstyle-mixing’) ) ? $site_name : $site_logo; ?> </a>
When I put the _Brand.php in my child theme, every page will get the “white” logo, and not only the hardstyle-mixing page.
August 2, 2016 at 10:04 am #1113852Hey There,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks.August 2, 2016 at 11:57 am #1114035This reply has been marked as private.August 2, 2016 at 1:05 pm #1114141Hi there,
Please provide us with your FTP credentials, so that we can check your child theme setup and check the code.
Thanks!
August 3, 2016 at 2:31 am #1115035There is no FTP on my server. I have SSH, but that is secured so thoroughly that you need a certificate for that.. I need to ask my server-guys about how to login, is there another way to do it? Can’t I just WeTransfer the whole folder?
August 3, 2016 at 5:42 am #1115210Hi there,
Please update your code to :
<?php // ============================================================================= // VIEWS/GLOBAL/_BRAND.PHP // ----------------------------------------------------------------------------- // Outputs the brand. // ============================================================================= $site_name = get_bloginfo( 'name' ); $site_description = get_bloginfo( 'description' ); $logo = x_make_protocol_relative( x_get_option( 'x_logo' ) ); $site_logo = '<img src="' . $logo . '" alt="' . $site_description . '" />'; if ( is_page('hardstyle-mixing') ) { $site_logo = '<img src="https://whiteseastudio.com/wp-content/uploads/2016/08/White-Sea-Logo-front-WHITE.png" alt="Logo" />'; } ?> <?php echo ( is_front_page() ) ? '<h1 class="visually-hidden">' . $site_name . '</h1>' : ''; ?> <a class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>"> <?php echo ( $logo == '' && !is_page('hardstyle-mixing') ) ? $site_name : $site_logo; ?> </a>
Hope it helps.
August 3, 2016 at 7:06 am #1115285That works!
There is another page that needs the white logo, can I just duplicate this line?
if ( is_page('hardstyle-mixing') ) { $site_logo = '<img src="https://whiteseastudio.com/wp-content/uploads/2016/08/White-Sea-Logo-front-WHITE.png" alt="Logo" />'; }
August 3, 2016 at 8:42 am #1115384Hi There,
Please try with this:
if ( is_page( array('hardstyle-mixing', 'your-page-slug') ) ) { $site_logo = '<img src="https://whiteseastudio.com/wp-content/uploads/2016/08/White-Sea-Logo-front-WHITE.png" alt="Logo" />'; }
Hope it helps 🙂
-
AuthorPosts