• Resolved martinfamily2005

    (@martinfamily2005)


    I have read a lot of articles about this, but have only really found out how to remove the post titles on pages….but I want to remove the PAGE titles and created dates on all pages, but not affect the post titles at all. If you know how to do this, please advise.

    page.php

    <?php include("header.php"); ?>
    
    <!-- BEGIN content -->
    <div id="content">
    
    	<?php
    	if (have_posts()) : the_post();
    	?>
    
    	<?php else : ?>
    	<div class="notfound">
    		<h2>Not Found</h2>
    		<p>Sorry, but you are looking for something that is not here.</p>
    	</div>
    	<?php endif; ?>
    
    </div>
    <!-- END content -->
    
    <?php get_sidebar(); get_footer(); ?>

    index.php

    <?php include("header.php"); ?>
    
    <!-- BEGIN content -->
    <div id="content">
    
    	<?php
    	if (have_posts()) :
    	while (have_posts()) : the_post();
    	?>
    
    	<!-- BEGIN post -->
    	<div class="post">
    		<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    		<a href="<?php the_permalink(); ?>"><?php dp_attachment_image($post->ID, 'thumbnail', 'alt="' . $post->post_title . '"'); ?></a>
    		<?php the_excerpt(); ?>
    		<p class="date"><?php the_time('F j, Y') ?></p>
    	</div>
    	<!-- END post -->
    
    	<?php endwhile; ?>
    
    	<?php else : ?>
    	<div class="notfound">
    		<h2>Not Found</h2>
    		<p>Sorry, but you are looking for something that is not here.</p>
    	</div>
    	<?php endif; ?>
    
    </div>
    <!-- END content -->
    
    <?php get_sidebar(); get_footer(); ?>

Viewing 11 replies - 1 through 11 (of 11 total)
  • A lot depends on your theme. Please post a link to your site, and point out the problem areas. If you are using a free theme, someone may be able to help.

    Thread Starter martinfamily2005

    (@martinfamily2005)

    http://www.billboardfamily.com

    mensa theme

    I just want to hide the page titles on the actual pages, and the date of creation, too. i do not want the POST titles hidden.

    Yoiu need to make a page template and then delete the title and date calls from that template: Page Templates « WordPress Codex

    Make a backup copy first! Then, in page.php, delete lines to change this:

    <!-- begin post -->
    	<div class="single">
    
    		<h2><?php the_title(); ?></h2>
    		<p class="details">
    		<?php the_time('F j, Y') ?> |
    		<?php the_category(', ') ?>
    		</p>
    		<div class="break"></div>

    to this:

    <!-- begin post -->
    	<div class="single">
    
    -		<div class="break"></div>
    Thread Starter martinfamily2005

    (@martinfamily2005)

    Resolved, thanks.

    Glad you worked it out! Now, please use the dropdown at top right to mark this topic ‘Resolved’.

    Thread Starter martinfamily2005

    (@martinfamily2005)

    Done

    And redone!

    I have the same issue but MY page.php file looks like this (using Mystique theme):

    <?php
     /* Mystique/digitalnature */
     get_header();
    ?>
    
      <!-- main content: primary + sidebar(s) -->
      <div id="main">
       <div id="main-inside" class="clear-block">
        <!-- primary content -->
        <div id="primary-content">
         <div class="blocks">
           <?php do_action('mystique_before_primary'); ?>
           <?php
    
            if (have_posts()):
             while (have_posts()):
              the_post();
              mystique_page();
             endwhile;
            endif;
    
            comments_template();
           ?>
           <?php do_action('mystique_after_primary'); ?>
         </div>
        </div>
        <!-- /primary content -->
    
        <?php get_sidebar(); ?>
    
       </div>
      </div>
      <!-- /main content -->
    
    <?php get_footer(); ?>

    Can anyone help me? Thanks.

    I guess with my theme there is probably a different file I need to edit.

    From the code in mystique/lib/core.php, it looks like there is a ‘hide-title’ option that you can set somewhere.

    Also, replies to old posts are normally ignored. You should start a new thread. I just happened to see your reply while looking for something else.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Need help: Exclude PAGE titles (not post titles) on all pages’ is closed to new replies.