Support » Fixing WordPress » Display Meta-Data

Viewing 8 replies - 1 through 8 (of 8 total)
  • Michael

    (@alchymyth)

    Forum Moderator

    should display the meta-data beneath each post, but for some reason I can’t get it to show up

    you have hidden the output with this style in your child theme:

    footer.entry-meta {
    display: none;
    }

    if you want to show the date/time in a different place, the right file to add your code would be possibly be content.php

    Ok thanks. I want a date below the post-title similar to this website. Any suggestions?

    http://pinchofyum.com

    Michael

    (@alchymyth)

    Forum Moderator

    for instance, edit content.php (in the child theme) and add your time code before this line:

    </header><!-- .entry-header -->

    wrap the code into a div for better formatting;
    example:

    <div class="entry-time"><?php the_time('m/j/y g:i A') ?></div>

    format it with
    .entry-time { .... }

    Sorry I am new to this, does that mean I need to create another document to import into my child theme called content.php and then make the changes there?

    What code do I need to include to make sure it overrides the parent theme?

    Thanks for the help.

    Michael

    (@alchymyth)

    Forum Moderator

    http://codex.wordpress.org/Child_Themes

    working with a child theme is the recommended way of customizing themes (at least any of the default themes that come with WordPress, and themes that might get updated regularly).

    Great, last question. Thanks.

    I think I got it to work except the time stamp is only showing up on the first blog post on my home page… any suggestions?

    Michael

    (@alchymyth)

    Forum Moderator

    it seems as if you have added the code at the end of header.php – not in content.php as suggested.

    to be shown with every post (standard post format) the timestamp code needs to be in content.php, at this marked location:

    .....
    			<?php else : ?>
    			<h1 class="entry-title">
    				<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
    			</h1>
    			<?php endif; // is_single() ?>
    INSERT TIME-STAMP CODE HERE
    		</header><!-- .entry-header -->
    
    		<?php if ( is_search() ) : // Only display Excerpts for Search ?>
    .....

    Cheers, I finally got it to work. Thank you for the help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Display Meta-Data’ is closed to new replies.