WordPress.org

Ready to get started?Download WordPress

Forums

How to remove title and description on individual posts and pages (12 posts)

  1. jennypretty
    Member
    Posted 1 year ago #

    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!

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Are you using a child theme?

  3. jennypretty
    Member
    Posted 1 year ago #

    No, I have only one theme.
    thanks.

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    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?

  5. jennypretty
    Member
    Posted 1 year ago #

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

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

    thanks.

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    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.

  7. jennypretty
    Member
    Posted 1 year ago #

    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.

  8. esmi
    Forum Moderator
    Posted 1 year ago #

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

  9. jennypretty
    Member
    Posted 1 year ago #

    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.

  10. esmi
    Forum Moderator
    Posted 1 year ago #

    What version of WordPress are you currently using?

  11. jennypretty
    Member
    Posted 1 year ago #

    3.5.1

  12. esmi
    Forum Moderator
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic