Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Remove post meta WordPress

  • SOLVED

Hi!

I'm looking for a CSS code (or plugin), witch hides the meta information on a page below the title.

For example here:
http://motoco.me/contact/

Hide this text: by MISCHA SCHAUB on Nov 23, 2011 • 12:55 • Edit entry

I could hide the the black writen text with this CSS code:

.entry .post-meta span, .entry .post-meta a {color: #000; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-style: normal;
display: none;
}


but then there is still: by and on there!

Also I would prefer to hide the post meta <strong>only on pages</strong> and not on articles, if possible.

Does anyone has a solution?

Thanks a lot!

Answers (2)

2012-05-19

Arnav Joy answers:

it is not good to hide to this using css , can you share page.php


Simone Fuchs comments:

<?php get_header(); ?>

<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>

<div class="entry">
<div <?php post_class('single clear'); ?> id="post_<?php the_ID(); ?>">
<div class="post-meta">
<h1><?php the_title(); ?></h1>
by <span class="post-author"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="Posts by <?php the_author(); ?>"><?php the_author(); ?></a></span> on <span
class="post-date"><?php the_time(__('M j, Y')) ?></span> &bull; <span><?php the_time() ?></span> <?php edit_post_link( __( 'Edit entry'), '&bull; '); ?>
<?php if ( comments_open() ) : ?>
<a href="#comments" class="post-comms"><?php comments_number(__('No Comments'), __('1 Comment'), __('% Comments'), '', __('Comments Closed') ); ?></a>
<?php endif; ?>
</div>
<div class="post-content"><?php the_content(); ?></div>
<div class="post-footer"><?php the_tags(__('<strong>Tags: </strong>'), ', '); ?></div>
</div>
</div>

<?php endwhile; ?>
<?php endif; ?>

<?php comments_template(); ?>

<?php get_footer(); ?>


Arnav Joy comments:

try this

<?php get_header(); ?>



<?php if ( have_posts() ) : ?>

<?php while ( have_posts() ) : the_post(); ?>



<div class="entry">

<div <?php post_class('single clear'); ?> id="post_<?php the_ID(); ?>">

<div class="post-meta">

<h1><?php the_title(); ?></h1>

<?php /*?>by <span class="post-author"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="Posts by <?php the_author(); ?>"><?php the_author(); ?></a></span> on <span class="post-date"><?php the_time(__('M j, Y')) ?></span> &bull; <span><?php the_time() ?></span><?php */?>
<?php edit_post_link( __( 'Edit entry'), '&bull; '); ?>

<?php if ( comments_open() ) : ?>

<a href="#comments" class="post-comms"><?php comments_number(__('No Comments'), __('1 Comment'), __('% Comments'), '', __('Comments Closed') ); ?></a>

<?php endif; ?>

</div>

<div class="post-content"><?php the_content(); ?></div>

<div class="post-footer"><?php the_tags(__('Tags: '), ', '); ?></div>

</div>

</div>



<?php endwhile; ?>

<?php endif; ?>



<?php comments_template(); ?>



<?php get_footer(); ?>


Simone Fuchs comments:

Great, thanks a lot, it's exactly what I was looking for!


Arnav Joy comments:

you can also try this

<?php get_header(); ?>



<?php if ( have_posts() ) : ?>

<?php while ( have_posts() ) : the_post(); ?>



<div class="entry">

<div <?php post_class('single clear'); ?> id="post_<?php the_ID(); ?>">

<div class="post-meta">

<h1><?php the_title(); ?></h1>

<div style="display:none"> <!--remove this div -->
by <span class="post-author"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="Posts by <?php the_author(); ?>"><?php the_author(); ?></a></span> on <span class="post-date"><?php the_time(__('M j, Y')) ?></span> &bull; <span><?php the_time() ?></span>
</div> <!--remove this div -->
<?php edit_post_link( __( 'Edit entry'), '&bull; '); ?>

<?php if ( comments_open() ) : ?>

<a href="#comments" class="post-comms"><?php comments_number(__('No Comments'), __('1 Comment'), __('% Comments'), '', __('Comments Closed') ); ?></a>

<?php endif; ?>

</div>

<div class="post-content"><?php the_content(); ?></div>

<div class="post-footer"><?php the_tags(__('Tags: '), ', '); ?></div>

</div>

</div>



<?php endwhile; ?>

<?php endif; ?>



<?php comments_template(); ?>



<?php get_footer(); ?>

2012-05-19

Hardeep Singh answers:

You can use:

.page .post-meta {
display: none;
}



Simone Fuchs comments:

I did try this already, it removes the title as well...