WordPress.org

Support

Support » Themes and Templates » How to remove title and description on individual posts and pages

How to remove title and description on individual posts and pages

  • Hello,

    Currently, on my individual posts or pages, the name of the title tag shows after the post title tag. And, the title and description show up on the top of the page as well.

    I am not good at php coding so can you help me with:
    1. How to remove title and description on individual posts and pages?
    2. How to remove the main title tag that shows after the post or page title and How to make the post or page titles to be <h1>, it is currently <h2>

    Here is my title code:

    <title><?php
    	/*
    	 * Print the <title> tag based on what is being viewed.
    	 */
    	global $page, $paged;
    
    	wp_title( '|', true, 'right' );
    
    	// Add the blog name.
    	bloginfo( 'name' );
    
    	// Add a page number if necessary:
    	if ( $paged >= 2 || $page >= 2 )
    		echo ' | ' . sprintf( __( 'Page %s', 'bouquet' ), max( $paged, $page ) );
    
    	?></title>

    Thanks very much!

Viewing 11 replies - 1 through 11 (of 11 total)
  • esmi

    @esmi

    Forum Moderator

    Are you using a child theme?

    No, I have only one theme.
    thanks.

    esmi

    @esmi

    Forum Moderator

    You should have at least two themes. Every single WordPress install should always have an unedited copy of the default theme (currently called 2012).

    What theme are you using? Where did you download it from?

    http://wordpress.org/themes/bouquet is the theme I am using.

    I don’t use default theme. Sorry about that.

    thanks.

    esmi

    @esmi

    Forum Moderator

    It should still be installed in your site. I’d suggest you re-upload it asap. In the meantime, do not edit the Bouquet theme. First create a child theme for your changes.

    I don’t understand…

    I just go to my hosting control panel and create a blog from there. Once it is finished, the blog has 2 default themes. What I did is to download Bouquet theme and upload it to my blog via FTP. After that, I just change from Bouquet theme.

    If I need to change the title tags, I only use header.php from Bouquet theme. However, I don’t know how to change it for what I needed as my question above.

    Thanks.

    esmi

    @esmi

    Forum Moderator

    What themes do you have installed in Appearance -> Themes?

    I have Bouquet, Classic and DEfault themes. I activated only Bouquet theme.

    I tried to add an IF before <h1> as:

    <?php if (is_home()):?>
    <h1 id="site-title"><a>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"></a></h1>
    <?php else:?>
    <h1 id="site-title"><?php bloginfo( 'name' ); ?></h1>
    <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>

    [Please post code & markup between backticks or use the code button. Your posted code has now been permanently damaged by the forum’s parser.]

    But it didn’t work.

    Thanks.

    esmi

    @esmi

    Forum Moderator

    What version of WordPress are you currently using?

    3.5.1

    esmi

    @esmi

    Forum Moderator

    So why did you delete the Twenty Eleven and Twenty Twelve themes? Re-upload a fresh copy of the Twenty Twelve theme. You can delete the Classic and Default (Kubrick) themes. They will no longer work in the current version of WordPress.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to remove title and description on individual posts and pages’ is closed to new replies.
Skip to toolbar