Support » Theme: Chosen » How do I edit the tagline?

Viewing 15 replies - 1 through 15 (of 18 total)
  • 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.

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

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

    and paste on the css

    .tagline span{
        font-weight: bold;
    }

    ah didnt work. i had hope… ha

    try

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

    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

    you beat me, ok ill try that first

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

    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.

    Moderator 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.

    <!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' ); ?>

    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?

    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;
    }

    <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.