WordPress.org

Forums

Meta data on a wordpress post (2 posts)

  1. VaMoose
    Member
    Posted 1 year ago #

    I am fixing a wordpress site for a friend, I need to put all the meta data to the post (It is just showing the title and content, and then the back and next buttons above the content block?) as well as the comments block for that post.

    Here is the code:

    <?php
    get_header();
    
    if (is_active_sidebar('blog')) get_sidebar('blog');
    
    if (have_posts()) {
    
    	while (have_posts()) : the_post();
    $post = get_post($id); //assuming $id has been initialized
    setup_postdata($post);
    
    //the_title();
    //the_excerpt();
    
    	if (get_post_type() !== 'post') {
    			get_template_part('content', get_post_type() );
    		} else
    			get_template_part('content', get_post_format());		
    
    	endwhile;
    } else { ?>
    
    	<div <?php post_class(); ?>>
    		<div class="post-head"></div>
    		<div class="post">
    			<p><?php _e('Sorry, post is not found.','easel'); ?></p>
    			<div class="clear"></div>
    		</div>
    		<div class="post-foot"></div>
    	</div>
    
    	<?php
    }
    
    get_footer();

    Any ideas on how to do this?

    Thanks in advance!

  2. Krishna
    Volunteer Moderator
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic