• Resolved dsienko

    (@dsienko)


    I’m not getting metadata to appear:

    Here’s the code for my content php
    <?php

    $post = array( ‘post_type’ => ‘ngobin’, ‘posts_per_page’ => ‘5’ );
    $loop = new WP_Query( $post );

    ?>
    <?php while ( $loop->have_posts() ) : $loop->the_post();?>
    <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
    <header class=”entry-header”>
    <?php
    if ( is_single() ) {
    the_title( ‘<h3 class=”entry-title”>’, ‘</h3>’ );
    } else {
    the_title( ‘<h3 class=”entry-title”>‘, ‘</h3>’ );
    }
    if ( ‘post’ === get_post_type() ): ?>
    <div class=”post-details”>
    <i class=”fa fa-user”></i><?php the_author(); ?>
    <i class=”fa fa-clock-o”></i> <time><?php the_date(); ?></time>
    <i class=”fa fa-folder”></i> <?php the_category(‘, ‘ ) ?>
    <i class=”fa fa-tags”></i> <?php the_tags(); ?>
    <div class=”post-comments-badge”>“><i class=”fa fa-comments”></i><?php comments_number( 0, 1, ‘%’ ); ?>
    </div> <!– post-comments-badge–>
    <?php edit_post_link( ‘Edit’, ‘<i class=”fa fa-pencil”></i>’, ” ); ?>
    </div>
    <!– post->

    <?php
    endif; ?>
    </header><!– .entry-header –>
    <?php if ( has_post_thumbnail () ) { // check for feature image ?>
    <div class=”post-image”>
    <?php the_post_thumbnail ();?>
    </div> <!– ================ End Post Image ================= –>
    <?php } ?>
    <div class=”post-excerpt”>
    <?php if (is_single()) {
    the_content();
    } else {
    the_excerpt();
    } ?>
    </div><!– ================ End Post Excerpt ================= –>
    <footer class=”entry-footer”>
    <?php the_language_of_puget_sound_entry_footer(); ?>
    </footer><!– .entry-footer –>
    </article><!– #post-## –>

    <?php endwhile; // end of the loop ?>

    I’m trying to get to appear as the same on my main page. I want each staff member to have a page to post what is happening in their classroom. Current page i’m working on is ngobin.

    The site is still under development.

    50.87.248.66/~tulalipl/

Viewing 1 replies (of 1 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not sure if this was previously answered to, and lost the replies, or if I somehow completely missed it, but I figured I’d check in anyway.

    Did you ever get this resolved? or is it a lingering issue for you at the moment?

    You’ll want to use functions like get_post_meta() to grab meta data for display in your template files.

Viewing 1 replies (of 1 total)
  • The topic ‘Metadata not coming through’ is closed to new replies.