WordPress.org

Ready to get started?Download WordPress

Forums

Title and Description tags aren't working as they are supposed to... (3 posts)

  1. acrdepos
    Member
    Posted 2 months ago #

    After integrating my new WordPress blog with my website's current theme, I noticed one small problem. If you look on my wordpress page:

    http://www.acrdepos.com/wordpress/

    You'll notice that the title and description tag refers to the most recent post in the blog. What I'm aiming for is the Title and Description tags to reflect the actual blog's description and title. I can provide the code for the index.php file if anyone needs it.

  2. esmi
    Forum Moderator
    Posted 2 months ago #

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

  3. acrdepos
    Member
    Posted 2 months ago #

    esmi,
    The theme I'm using is a child theme of Twenty Twelve. I've actually integrated my WordPress theme via this tutorial.

    To give you a better understanding of what the code looks like, here is my index.php code as well as my header.php code:

    Index.php:

    <!-- begin the index file -->
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
    <?php get_header(); ?>
    <div id="wrapper">
    <!-- Section One-->
    <div id="section_one">
    
    <div id="section_one_threequarters">
    
    <?php if ( have_posts() ) : ?>
    <?php /* Start the Loop */ ?>
    <?php while ( have_posts() ) : the_post(); ?>
    <?php get_template_part( 'content', get_post_format() ); ?>
    <?php endwhile; ?>
    <?php twentytwelve_content_nav( 'nav-below' ); ?>
    <?php else : ?>
    
    <article id="post-0" class="post no-results not-found">
      <?php if ( current_user_can( 'edit_posts' ) ) :
    // Show a different message to a logged-in user who can add posts.
          ?>
      <header class="entry-header">
        <h1 class="entry-title">
          <?php _e( 'No posts to display', 'twentytwelve' ); ?>
        </h1>
      </header>
      <div class="entry-content">
        <p><?php printf( __( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'twentytwelve' ), admin_url( 'post-new.php' ) ); ?></p>
      </div>
      <!-- .entry-content -->
    
      <?php else :
    // Show the default message to everyone else.
          ?>
      <header class="entry-header">
        <h1 class="entry-title">
          <?php _e( 'Nothing Found', 'twentytwelve' ); ?>
        </h1>
      </header>
      <div class="entry-content">
        <p>
          <?php _e( 'Apologies, but no results were found. Perhaps searching will help find a related post.', 'twentytwelve' ); ?>
        </p>
        <?php get_search_form(); ?>
      </div>
      <!-- .entry-content -->
      <?php endif; // end current_user_can() check ?>
    </article>
    <!-- #post-0 -->
    
    <?php endif; // end have_posts() check ?>
    
    <br>
    <a href='#' onClick="history.go(-1);return false"><img src="http://www.acrdepos.com/img/buttons/BackButton.png" alt="Go Back"></a>
    
    </div>
    
    <div id="section_one_onequarter">
    
    <?php get_sidebar(); ?>
    
    <a href="http://www.acrdepos.com/scheduling/schedule-a-deposition.php"><img src="http://www.acrdepos.com/img/buttons/ScheduleDeposition.png" alt="Schedule a Deposition"></a><br>
    <a href="http://www.acrdepos.com/scheduling/schedule-a-video-conference.php"><img src="http://www.acrdepos.com/img/buttons/ScheduleVideoConference.png" alt="Schedule a Video Conference"></a>
    
    </div>
    
    </div>
    <?php get_footer(); ?>
    <!-- end the index file -->

    Header.php

    <!-- begin the header file -->
    
    <!DOCTYPE html>
    <!--[if IE 7]>
    <html class="ie ie7" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if IE 8]>
    <html class="ie ie8" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if !(IE 7) | !(IE 8)  ]><!-->
    <html <?php language_attributes(); ?>>
    <!--<![endif]-->
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <meta name="viewport" content="width=device-width" />
    <title><?php wp_title( '|', true, 'right' ); ?></title>
    <link rel="profile" href="http://gmpg.org/xfn/11" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
    <!--[if lt IE 9]>
    <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
    <![endif]-->
    <?php wp_head(); ?>
    </head>
    <body>
    
    <div id="messagebar">
    <?php get_template_part( 'site_files/site_messagebar' ); ?>
    </div>
    
    <div id="topheader">
    <?php get_template_part( 'site_files/site_topheader' ); ?>
    </div>
    
    <!-- Open Header for Nav and Contact Info -->
    <div id="header">
    <?php get_template_part( 'site_files/site_navigation' ); ?>
    </div>
    
    <!-- end the header file -->

    Thanks for the quick response!

Reply

You must log in to post.

About this Topic