[Theme: Duena] Target a Word in Header with PHP
-
Hi All,
PHP rookie here….
For my Duena theme there is customization in the Dashboard for a title and site description on the home page.
The title, in my case. is a person’s name. I want to target the last name only and stylize it in “Style.css“. If I was working with an HTML file, I would add a <span> tag and class.
It looks like I need to modify the “Header.php” code in some way to target the name. The code does not distinguish between first and last name.
Code below:
<div class="container clearfix"> <div class="logo"> <?php if (( of_get_option('logo_type') == 'image_logo') && ( of_get_option('logo_url') != '')) { ?> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="<?php echo esc_url( of_get_option('logo_url') ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"></a> <?php } else { ?> <?php if ( is_front_page() || is_home() || is_404() ) { ?> <h1 class="text-logo"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> <?php } else { ?> <h2 class="text-logo"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h2> <?php } ?> <?php } ?> <p class="site-description"><?php bloginfo( 'description' ); ?></p> </div> <?php if ( of_get_option('g_search_box_id') == 'yes') { ?>
Hope you can help!
Thanks,
cmeister
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘[Theme: Duena] Target a Word in Header with PHP’ is closed to new replies.