Forums

[resolved] Need help: Exclude PAGE titles (not post titles) on all pages (12 posts)

  1. martinfamily2005
    Member
    Posted 1 year ago #

    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(); ?>
  2. vtxyzzy
    Member
    Posted 1 year ago #

    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.

  3. martinfamily2005
    Member
    Posted 1 year ago #

    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.

  4. songdogtech
    Member
    Posted 1 year ago #

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

  5. vtxyzzy
    Member
    Posted 1 year ago #

    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>
  6. martinfamily2005
    Member
    Posted 1 year ago #

    Resolved, thanks.

  7. vtxyzzy
    Member
    Posted 1 year ago #

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

  8. martinfamily2005
    Member
    Posted 1 year ago #

    Done

  9. vtxyzzy
    Member
    Posted 1 year ago #

    And redone!

  10. metasteve
    Member
    Posted 1 year ago #

    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.

  11. metasteve
    Member
    Posted 1 year ago #

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

  12. vtxyzzy
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic