• Resolved WhitWhit

    (@whitwhit)


    Hey, I want to bold one word of the tagline but not sure how. I’ve found the tagline in the header.php, but not the actual tagline…just the code. Since the only way to edit the tagline via theme options is through the customizer I figured I could <strrong>bold my word</strrong> in the header.php but the text isnt in there to edit. Suggestions?

    (I know I spelled it wrong, so it wouldnt bold my words here in the post) ??

    Website: https://lazarsbazar.ownitwebdesigns.com/
    Tagline: Your Kratom Headquarters

    He wants the word Kratom in bold.

    Thank you in advance!!

    ~Whitney

Viewing 15 replies - 1 through 15 (of 18 total)
  • remediosgraphic

    (@remediosgraphic)

    ok this should fix that.

    .tagline {
        font-weight: bold;
    }

    add this at the end of the css on your theme or find the class .tagline and add the bold property.

    Thread Starter WhitWhit

    (@whitwhit)

    He only wants to word “kratom” in bold though, not the entire tagline.

    remediosgraphic

    (@remediosgraphic)

    ok try this
    on your tag line use
    Your <span>Kratom</span> Headquarters

    and paste on the css

    .tagline span{
        font-weight: bold;
    }

    Thread Starter WhitWhit

    (@whitwhit)

    ah didnt work. i had hope… ha

    remediosgraphic

    (@remediosgraphic)

    try

    Your <span style="font-weight: bold;">Kratom</span> Headquarters

    Thread Starter WhitWhit

    (@whitwhit)

    Im playing around with it and the customizer just isnt recognizing the html. ive edited other parts of html via .php. The header.php files is labeled <!DOCTYPE html> but none of the content is in it. Shouldnt it be? I copied over the parent into a child file… maybe it didn’t copy the content over and its in the parent? Gonna check

    Thread Starter WhitWhit

    (@whitwhit)

    you beat me, ok ill try that first

    remediosgraphic

    (@remediosgraphic)

    or add me to skype: remediosaraya we can do a video call and edit the header.php

    Thread Starter WhitWhit

    (@whitwhit)

    No love! The content isnt in the parent themes either. This is what the header.php looks like.

    <body id=”<?php print get_stylesheet(); ?>” <?php body_class(); ?>>

    <?php do_action( ‘body_top’ ); ?>

    <!–skip to content link–>
    <?php _e(‘Skip to content’, ‘chosen’); ?>

    <div id=”overflow-container” class=”overflow-container”>
    <div id=”max-width” class=”max-width”>
    <?php do_action( ‘before_header’ ); ?>
    <header class=”site-header” id=”site-header” role=”banner”>
    <div id=”menu-primary-container” class=”menu-primary-container”>
    <?php get_template_part( ‘menu’, ‘primary’ ); ?>
    <?php ct_chosen_social_icons_output(‘header’); ?>
    </div>
    <button id=”toggle-navigation” class=”toggle-navigation” name=”toggle-navigation” aria-expanded=”false”>
    <span class=”screen-reader-text”><?php _e(‘open menu’, ‘chosen’); ?></span>
    <?php echo ct_chosen_svg_output( ‘toggle-navigation’ ); ?>
    </button>
    <div id=”title-container” class=”title-container”>
    <?php get_template_part(‘logo’) ?>
    <?php if ( get_bloginfo( ‘description’ ) ) {
    echo ‘<p class=”tagline”>’ . get_bloginfo( ‘description’ ) .'</p>’;
    } ?>
    </div>
    </header>
    <?php do_action( ‘after_header’ ); ?>
    <section id=”main” class=”main” role=”main”>
    <?php do_action( ‘main_top’ ); ?>

    Im assuming this is the line I wold have seen the tagline content in?

    echo ‘<p class=”tagline”>’ . get_bloginfo( ‘description’ ) .'</p>’;

    Unless the content is in another file? I dont see anything else it would be in though.

    Thread Starter WhitWhit

    (@whitwhit)

    stephencottontail

    (@stephencottontail)

    WordPress strips out certain HTML tags (and encodes the rest) from the tagline, so you won’t be able to do exactly what you’re trying to do. Instead, you should copy over header.php to your child theme and replace

    echo '<p class="tagline">' . get_bloginfo( 'description' ) .'</p>';

    with

    echo '<p class="tagline">' . html_entity_decode( get_bloginfo( 'description' ) ) . '</p>';

    Disclaimer: This should be safe to do because WordPress strips out potentially problematic tags like <script></script> before saving the tagline to the database. You should still exercise caution as to who you allow access to your Dashboard.

    Thread Starter WhitWhit

    (@whitwhit)

    <!DOCTYPE html>
    
    <html <?php language_attributes(); ?>>
    
    <head>
    
        <?php wp_head(); ?>
    
    </head>
    
    <body id="<?php print get_stylesheet(); ?>" <?php body_class(); ?>>
    
    <?php do_action( 'body_top' ); ?>
    
    <!--skip to content link-->
    <a class="skip-content" href="#main"><?php _e('Skip to content', 'chosen'); ?></a>
    
    <div id="overflow-container" class="overflow-container">
    	<div id="max-width" class="max-width">
    		<?php do_action( 'before_header' ); ?>
    		<header class="site-header" id="site-header" role="banner">
    			<div id="menu-primary-container" class="menu-primary-container">
    				<?php get_template_part( 'menu', 'primary' ); ?>
    				<?php ct_chosen_social_icons_output('header'); ?>
    			</div>
    			<button id="toggle-navigation" class="toggle-navigation" name="toggle-navigation" aria-expanded="false">
    				<span class="screen-reader-text"><?php _e('open menu', 'chosen'); ?></span>
    				<?php echo ct_chosen_svg_output( 'toggle-navigation' ); ?>
    			</button>
    			<div id="title-container" class="title-container">
    				<?php get_template_part('logo')  ?>
    				<?php if ( get_bloginfo( 'description' ) ) {
    					echo '<p class="tagline">' . get_bloginfo( 'description' ) .'</p>';
    				} ?>
    			</div>
    		</header>
    		<?php do_action( 'after_header' ); ?>
    		<section id="main" class="main" role="main">
    			<?php do_action( 'main_top' ); ?>
    Thread Starter WhitWhit

    (@whitwhit)

    got the code to paste pretty… ??

    Ok, stephencottontail – is that basically telling the customizer to read the html? and I should just keep the html in the customizer tagline field?

    remediosgraphic

    (@remediosgraphic)

    also i was reading if you use html_entity_decode and get_bloginfo, you’re able to use HTML code in the description.

    <span> Kratom </span>

    and them use the css

    .tagline span{
        font-weight: bold;
    }

    remediosgraphic

    (@remediosgraphic)

    <span>Kratom</span> sorry

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘How do I edit the tagline?’ is closed to new replies.