Logo Text Partly Bold and Partly Regular

Hi, I would like to make my logo text at the top of each page partly bold and partly regular font. It’s for the website summitcastle.com. I would like the words “Summit Castle” bold and the word “Advisors” in regular font. How would I do that? Thanks.

Derek

Hello Derek,

Thanks for writing in! Because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.

Once you have your child theme active and ready, please follow the following steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?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 . '">';

?>

<?php echo '<h1 class="visually-hidden"><strong>Summit Castle</strong> Advisors</h1>'; ?>

<a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>">
  <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?>
</a>

3] Save the file named as _brand.php
4] Upload this file to your server in the child theme’s folder wp-contents/themes/x-child/framework/legacy/cranium/headers/views/global

You will need to create the folder path because it does not exist in your child theme yet.

We would loved to know if this has work for you. Thank you.

Thanks, I just did all that by creating/activating a child theme and creating that path for the .php file but it’s still not working. The site title is still showing without any bold. What would you suggest?

Hello There,

There is an on going error 500 in your site. It means that a fatal error is occurring. Please enable the debug mode. You can do this by opening wp-config.php and adding


define('WP_DEBUG', true);

/* That's all, stop editing! Happy blogging. */

When you revisit the page, you should have some error output describing the issue in more detail. And if you have a difficulty in resolving the issue, please provide us access to your site including your FTP details so that we can investigate and find resolution to this issue.

Thank you.

I included that line of code, what would you recommend next?

How would I be able to give my credentials privately and what credentials would you need?

Hello There,

To do this, you can create a secure note with the following info:
– Link to your site
– WordPress Admin username / password

  • FTP hostname
  • FTP username
  • FTP password

To know how to create a secure note, please check this out: https://theme.co/apex/forum/t/how-to-get-support/288

Thank you.

Ok, sent via secure message. Let me know if you need anything else.

Hi,

Sorry the bold was appliead to a different title.

Please replaced the code in _brand.php with 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 . '">';

?>

<?php echo '<h1 class="visually-hidden">Summit Castle Advisors</h1>'; ?>

<a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>">
	<strong>Summit Castle</strong> Advisors
</a>

Hope that helps

I just replaced the code and it still doesn’t look like it’s working.

Hi Derek,

Upon checking again, I can see you are utilizing the visually hidden title.

Please revert back to the original code.

<?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 . '">';

?>

<?php echo '<h1 class="visually-hidden"><strong>Summit Castle</strong> Advisors</h1>'; ?>

<a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>">
  <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?>
</a>

It was not working because of incorrect folder path. Please replace the folder view with views

Thanks

That seemed to work, but I selected arial font face for that logo in Theme Options, but it’s not pulling through. Do I need to update it in the code instead?

Hi,

Yes, you can add the font in the code itself.

Change this line

<?php echo '<h1 class="visually-hidden"><strong>Summit Castle</strong> Advisors</h1>'; ?>

to this

<?php echo '<h1 style="font-family:Arial;" class="visually-hidden"><strong>Summit Castle</strong> Advisors</h1>'; ?>

Hope that helps

The last word goes to the second line, but when it’s in the standard font it never does that. How can we keep the whole title always on the same line?

Hi,

In Theme Options > CSS

Find this code

.x-navbar-inner h1.visually-hidden {
clip: auto;
margin: 0;
font-size: 20px;
color: #0188c6;
width: 210px;
height: 35px;
margin-left: 62px;
margin-top: 9px;
}

Then increase width to at least `250px;

Thanks

That did it! Thanks

You’re welcome! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.