• Resolved rana1863

    (@rana1863)


    Hi, I am using gazpoMag theme. I put a tag line in general settings but it doesn’t appear; only blog title shows up. I have searched the forum where people have said about editing header.php for this issue. But I couldn’t understand what exactly I have to change. Below I have pasted the code in my header.php file, so can anyone please tell me which lines I have to change.

    I would really appreciate anyone’s help!

    Thanks

    <!DOCTYPE HTML>
    <?php include( TEMPLATEPATH . '/includes/get_options.php' ); ?>
    <html xmlns="https://www.w3.org/1999/xhtml">
    <head>
    	<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
    	<?php if($gazpo_favicon_url){ ?>
    	<link rel="shortcut icon" href="<?php echo ($gazpo_favicon_url); ?>" />
    	<?php } ?>
    	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    	<link rel="profile" href="https://gmpg.org/xfn/11" />
    	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    
    	<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feeds" href="<?php if ($gazpo_rss_url) { echo $gazpo_rss_link; } else { bloginfo('rss2_url'); } ?>" />
    
    	<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    	<link href="https://fonts.googleapis.com/css?family=Droid+Serif:regular,italic,bold" rel="stylesheet" type='text/css' />
    
    	<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    	<?php wp_head(); ?>
    
    </head>
    <body>
    
    <div id="header">
    <div class="wrap">
    	<div class = "logo">
    		<?php if ($gazpo_logo_url){ ?>
    		<a href="<?php bloginfo('siteurl');?>/" title="<?php bloginfo('name');?>">
    			<img src="<?php echo $gazpo_logo_url; ?>" alt="<?php bloginfo( 'name' ); ?>" />
    		</a>
    		<?php }else {?>
    		<div class="text">
              <h1><a href="<?php bloginfo('siteurl');?>/" title="<?php bloginfo('name');?>"><?php bloginfo('name');?></a></h1>
            </div>
    		<?php } ?>
    	</div>
    	<div class = "right">
    		<div class = "header-menu">
    			<?php wp_nav_menu( array(
    					'container' => false,
    					'theme_location' => 'header_menu'
    				) );
    			?>
    		</div>
    		<?php
    		if ($gazpo_twitter_username){ ?>
    
    		<div class = "twitter">
    			<ul id="twitter_update_list"><li>&nbsp;</li></ul>
    		</div>
    
    		<?php } ?>
    	</div>
    </div>
    
    </div>
    
    <div id="subheader">
    <div class="wrap">
    	<div class="main-menu">
    		<?php wp_nav_menu( array(
    					'container' => false,
    					'theme_location' => 'main_menu'
    				) );
    		?>
    	</div>
    	<div class="search">
    		<?php $search_text = "Search"; ?>
    			<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
    				<input class="searchfield" type="text" value="<?php echo $search_text; ?>" name="s" id="s" onblur="if (this.value == '') {this.value = '<?php echo $search_text; ?>';}" onfocus="if (this.value == '<?php echo $search_text; ?>') {this.value = '';}" />
    				<input type="hidden" id="searchsubmit" />
    			</form>
    	</div>
    </div>
    </div>
    
    <div id="container">
Viewing 10 replies - 1 through 10 (of 10 total)
  • are you using a logo image?

    if not, you could add the tagline after this code:

    <h1><a href="<?php bloginfo('siteurl');?>/" title="<?php bloginfo('name');?>"><?php bloginfo('name');?></a></h1>

    for example:

    <h2><?php bloginfo('description');?></h1>

    might need some formatting…

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Alchymyth, I think this thread is duplicated from https://www.ads-software.com/support/topic/theme-not-showing-tag-line?replies=13 .

    That linked thread is continuing even though it’s marked resolved.

    Thread Starter rana1863

    (@rana1863)

    Hi, I have marked that thread as resolved and not going to follow up. Andrew, you posted there after I marked that thread as resolved so I replied you there.

    OK, I left that thread and will continue here:

    Andrew, as you said, I have made few modifications to the code and it seems to resolve the issue, but I think I have not done this in a proper way. This is how I have done:

    <title><?php wp_title(); bloginfo(‘name’); ?> – <?php bloginfo(‘description’); ?></title>

    Hi alchymyth, I am using a logo image so should I still try the way you told?

    Thanks

    Thread Starter rana1863

    (@rana1863)

    But now it’s not showing the title tag on posts the way I want it to.
    For post, it is showing:”Post title and site title together” and then dash(-) description.

    For individual posts, I just want it like this way: “post title” – “blog title”

    I hope I made it understandable for you!

    thanks, Andrew – the other topic is now closed, and remarked as unresoved to avoid confusion.

    Hi alchymyth, I am using a logo image so should I still try the way you told?

    no – when you are using a logo, not even the site title is shown; adding a site description – aka tag line – in that location does not make any sense.

    do you actually want to show the tagline visible the header of your site?

    because at the moment you are getting help with the meta title …

    Thread Starter rana1863

    (@rana1863)

    Alchymyth, I am using a logo image and don’t need anything in my header. Whatever I am saying is for what appears at the browser tab, called meta title as you said.

    Site title that I put in general settings is shown on browser tab. And below the site title option there is an option for tag line, I have filled that option but it doesn’t appear next to my title on browser window.

    For home page I want it to be: “blog title – tag line”
    For category pages: “category name – blog title”
    For individual posts: “post title – blog title”

    with those requirements you will probably have to work with conditional statements;

    example:

    <title><?php if( is_home() || is_front_page() ) {
    bloginfo('name'); echo ' - '; bloginfo('description'); } elseif( is_category() || is_single() ) { wp_title(' - ',true,'right'); bloginfo('name'); } else { wp_title(); } ?></title>

    https://codex.www.ads-software.com/Conditional_Tags
    https://codex.www.ads-software.com/Function_Reference/wp_title

    Thread Starter rana1863

    (@rana1863)

    Thanks Alchymyth, it worked for what I mentioned above. Now, I also got how it works:) The above code was not fulfilling my requirements for pages. For that I have to make a little modification in code and now it works perfectly. Below is the modified code:

    <title><?php if( is_home() || is_front_page() ) {
    bloginfo('name'); echo ' - '; bloginfo('description'); } elseif( is_category() || is_single() ) { wp_title(' - ',true,'right'); bloginfo('name'); } else { wp_title(' - ',true,'right'); bloginfo('name'); } ?></title>

    Thanks for everyone’s help and a special thanks to Alchymyth.

    Thread Starter rana1863

    (@rana1863)

    Solved

    Finally! add tagline to front page title solution. Thanks a lot!

    I’m new to using WordPress and I can really see that the level of users is reflecting on the level of help around. phew! =)

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to add tag line? Any help?’ is closed to new replies.