• Hello,

    I just figured out how to create a static home page for basically a CMS version of a WordPress site. I haven’t figured out how to keep the homepage title from appearing on the page. I just want it to appear on the tab button, not as a section header.

    I do want the section head on the other pages (About Us, Contact Us, etc.). It seems like it has something to do with the page.php file, but wouldn’t that remove the section title from all of my static pages? Is this something to do with the theme I am using?

    You can see a sample of what I’m talking about with this screen shot:
    https://www.antonellasevero.com/test-homepage.jpg

    Would I need to create a completely static homepage outside of the pages functionality?

    Thanks for any suggestions.

    Regards,
    Antonella

Viewing 7 replies - 16 through 22 (of 22 total)
  • Hello, I’m after the same thing, deleting double titles. The theme I’m using is Thematic and it doesn’t have a page.php. It looks like the php I need to modify might be on the index.php page. I’m not fluent in php. The two pages I’m trying to eliminate the double titles on is “About” and “Contact”, https://thedadreport.com/about/

    Here is my index.php code

    <?php get_header(); ?>
    <!-- "You know what I need? I need a drink. There's some ice and stuff back there. Why don't you make us all some old fashioneds? - Tyler Fitzgerald" -->
    
    <div id="contentwrap">
    
      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    	<div class="entry">
    		<h3 <?php if (is_page()) echo 'style="margin-bottom: 20px;" ' ?>class="entrytitle" id="post-<?php the_ID(); ?>"><a title="Article-Link (Permalink)" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> <?php edit_post_link('<img class="editpost" alt="Edit" src="' . get_bloginfo('template_directory') . '/images/edit.gif" />', '', ''); ?></h3>
    		<div class="entrymeta1">
    		<?php
    
    		if (! is_page()) {	// Do not display if we are on a page
    			// Date and author
    			if (is_single()) { $articledate = get_the_time('F j, Y, G:i') . ' Uhr'; } else { $articledate = get_the_time('F j, Y'); }
    			echo '<span class="meta-time">' . $articledate . '</span><span class="meta-category">'; the_category(', '); echo '</span><span class="meta-author"><a title="author" href="'; the_author_url(); echo '">'; the_author(); echo '</a></span>';
    			// Comments link
    			comments_popup_link('<span class="meta-comments">0 comments</span>', '<span class="meta-comments">1 comment</span>', '<span class="meta-comments">% comments</span>');
    
    		} // ! is_page()
    		?>
    		</div> <!-- [entrymeta1] -->
    
    		<div class="entrybody">
    			<?php the_content(__('Read more &raquo;'));?>
    		</div> <!-- [entrybody] -->
    
    		<?php if (is_single()) { ?>
    
    		<div class="entrymeta2">
    		<ul>
    		<?php
    		// *** Trackback URI: only if ping is enabled
    		if ( pings_open() ) { ?>
    			<li><a class="trackback-leftalign" title="Trackback-URL for '<?php the_title() ?>'" href="<?php trackback_url() ?>" rel="nofollow">Trackback-URL</a></li>
    <?php   }
    		?>
    
    		<?php
    		// *** RSS Comments: only if comments are enabled
    		if ( comments_open() ) { ?>
    			<li class="feed-leftalign"><span title="Subscribe to comments feed"><?php comments_rss_link('RSS feed for comments on this post') ?></span></li>
    <?php	}
    		?>
    
    		<?php
    		// *** Tags: only if there is any
    		if ( (function_exists('UTW_ShowTagsForCurrentPost')) ) { ?>
    		    <li class="utwtags"><span title="tags"><?php UTW_ShowTagsForCurrentPost("commalist") ?></span></li>
    <?php   }
    		?>
    		</ul>
    
    		</div> <!-- [entrymeta2] -->
    
    		<?php comments_template(); // Get wp-comments.php template ?>
    
    		<?php } // is_single() ?>
    
        <!--
    	<?php trackback_rdf(); ?>
    	-->
      </div> <!-- [entry] -->
    
      <?php endwhile; else: ?>
      <p><?php _e('No Entries found.'); ?></p>
      <?php endif; ?>
      <p><?php posts_nav_link(' — ', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?></p>
    
    </div> <!-- [contentwrap] -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Okay, the code to make it happen is in here cuz when deleted it did what I wanted, however it also took out the title of my blog post. I wanna keep the blog post title but kill the double title on the static pages like “About” and “Contact”. Thanks. E

    <h3 <?php if (is_page()) echo 'style="margin-bottom: 20px;" ' ?>class="entrytitle" id="post-<?php the_ID(); ?>"><a title="Article-Link (Permalink)" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> <?php edit_post_link('<img class="editpost" alt="Edit" src="' . get_bloginfo('template_directory') . '/images/edit.gif" />', '', ''); ?></h3>

    Replace the line that starts

    <h3 <?php if (is_page()) echo 's...

    with

    if (!is_page()) {
        <h3 <?php if (is_page()) echo 's...
    }

    This will only display the article header if it’s not a static page (i.e. it’s a blog post).

    Dave, As alluded to I’m not any good at php. I see where you put the “if” in front of the h3 but where do you insert the “}” at the end?
    I tried it after </h3> but it didn’t work that way. Thanks man.

    That’s my fault as I ommitted the <?php tags from my original post. Here is the code you need in context.

    <div class="entry">
        <?php if (!is_page()) { ?>
            <h3 <?php if (is_page()) echo 'style="margin-bottom: 20px;" ' ?>class="entrytitle" id="post-<?php the_ID(); ?>"><a title="Article-Link (Permalink)" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> <?php edit_post_link('<img class="editpost" alt="Edit" src="' . get_bloginfo('template_directory') . '/images/edit.gif" />', '', ''); ?></h3>
        <?php } ?>
    <div class="entrymeta1">

    My mistake above, the theme code shown is what I’m using but is not from Thematic, sorry, I have too many WP’s under construction. So apologies to Ian at Thematic and many thanks to davesgonebananas.

    Hello,

    My website is https://www.seowhitehats.com. I have duplicate title tags on all of my pages. Can any give me a recommendation on how to resolve this issue. I am not sure where to locate the piece of code to remove this?

    Thanks,

    Anthony

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘How to remove double titles’ is closed to new replies.