1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

missing author missing updated di WP

Discussion in 'Pemrograman Web' started by ArdieBakrie, Jan 16, 2017.

  1. ArdieBakrie

    ArdieBakrie Ads.id Fan

    Joined:
    Oct 18, 2009
    Messages:
    232
    Likes Received:
    11
    Halo agan2 semua, website ane pake wp templatenya Olsen Light & setelah dicek ternyata ada banyak error, terutama missing author dan missing updated. Kode apa yg harus ane pasang dan di mana pasangnya agar error tsb hilang ya gan? Mohon maaf banget kalo ane nanyanya terlalu detail gan, karena ane nol besar dan buta banget soal html :-(

    sebelumnya ane ucapkan terima kasih yg sebesar2nya buat agan2 yg bersedia membantu ane yg malang ini :-(


    Berikut adalah penampakan di single.php:


    <?php get_header(); ?>

    <div class="row">

    <div class="col-md-8">
    <main id="content" role="main" itemprop="mainContentOfPage" itemscope="itemscope" itemtype="http://schema.org/Blog">
    <div class="row">
    <div class="col-md-12">

    <?php while ( have_posts() ) : the_post(); ?>
    <article id="entry-<?php the_ID(); ?>" <?php post_class( 'entry' ); ?> itemscope="itemscope" itemtype="http://schema.org/BlogPosting" itemprop="blogPost">

    <div class="entry-meta entry-meta-top">
    <p class="entry-categories">
    <?php the_category( ', ' ); ?>
    </p>
    </div>

    <h2 class="entry-title" itemprop="headline">
    <?php the_title(); ?>
    </h2>

    <div class="entry-meta entry-meta-bottom">
    <time class="entry-date" itemprop="datePublished" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time>

    <a href="<?php echo esc_url( get_comments_link() ); ?>" class="entry-comments-no "><?php comments_number(); ?></a>
    </div>

    <?php if ( has_post_thumbnail() ) : ?>
    <div class="entry-featured">
    <a class="ci-lightbox" href="<?php echo esc_url( olsen_light_get_image_src( get_post_thumbnail_id(), 'large' ) ); ?>">
    <?php the_post_thumbnail( 'post-thumbnail', array( 'itemprop' => 'image' ) ); ?>
    </a>
    </div>
    <?php endif; ?>


    <div class="entry-content" itemprop="text">
    <?php the_content(); ?>
    <?php wp_link_pages(); ?>
    </div>

    <div class="entry-tags">
    <?php the_tags( '', '' ); ?>
    </div>

    <div class="entry-utils group">
    <?php get_template_part( 'part', 'social-sharing' ); ?>
    </div>

    <div id="paging" class="group">
    <?php
    $prev_post = get_previous_post();
    $next_post = get_next_post();
    ?>
    <?php if( ! empty( $next_post ) ): ?>
    <a href="<?php echo esc_url( get_permalink( $next_post ) ); ?>" class="paging-standard paging-older"><?php esc_html_e( 'Previous Post', 'olsen-light' ); ?></a>
    <?php endif; ?>
    <?php if( ! empty( $prev_post ) ): ?>
    <a href="<?php echo esc_url( get_permalink( $prev_post ) ); ?>" class="paging-standard paging-newer"><?php esc_html_e( 'Next Post', 'olsen-light' ); ?></a>
    <?php endif; ?>
    </div>

    <?php get_template_part( 'part', 'related' ); ?>

    <?php comments_template(); ?>

    </article>
    <?php endwhile; ?>
    </div>
    </div>
    </main>
    </div>

    <div class="col-md-4">
    <?php get_sidebar(); ?>
    </div>

    </div><!-- /row -->

    <?php get_footer(); ?>
     
  2. be_honest

    be_honest Super Hero

    Joined:
    Jun 2, 2009
    Messages:
    1,836
    Likes Received:
    246
    Location:
    cockpit
    Mudahnya, hapus themesnya, lalu upload themesnya lagi yang asli dari developer.
     
  3. xzoidberg

    xzoidberg Newbie

    Joined:
    Dec 11, 2008
    Messages:
    7
    Likes Received:
    0
    nanyanya kurang detail infonya gan. bnyk kemungkinannya.
    bisa jd dr plugin yg diinstall. dll
     
  4. daffyshaci

    daffyshaci S.E.O Freak

    Joined:
    Aug 26, 2011
    Messages:
    905
    Likes Received:
    1,433
    premium themes biasanya ga semua di letakan di single.php.. biasanya mereka punya template part atau bisa juga schema nya di letakan di functions,, coba cek template part dan functions themes nya..

    kalau diliat di coding single.php itu agan ga nampilin author di halaman tersebut,, coba cek option themes nya dan tampilin author nya,, cara paling gampang untuk fix masalah schema klo menurut ane pake tag <meta>.

    masalah dateupdate coba agan ganti yg ini :
    PHP:
    <div class="entry-meta entry-meta-bottom">
    ganti jadi seperti ini :
    PHP:
    <div itemprop="dateModified" class="entry-meta entry-meta-bottom">

    kalau tidak bisa coba ganti yang ini :
    PHP:
    <time class="entry-date" itemprop="datePublished" datetime="<?php echo esc_attrget_the_date'c' ) ); ?>"><?php echo esc_htmlget_the_date() ); ?></time>
    tambah meta data jadi seperti ini :
    PHP:
    <time class="entry-date" itemprop="datePublished" datetime="<?php echo esc_attrget_the_date'c' ) ); ?>"><?php echo esc_htmlget_the_date() ); ?></time>
    <meta itemprop="dateModified" content="<?php echo esc_attrget_the_date'c' ) ); ?>">

    untuk masalah author, kalau agan memang tidak mau menampilkan author bisa gunakan meta seperti tadi.. di bawah <div class="entry-meta entry-meta-bottom">
    masukan code :
    PHP:
    <div itemprop="author" itemscope="itemscope" itemtype="http://schema.org/Person"><meta itemprop="name" content="<?php the_author() ?>"></div>
     
    Last edited: Feb 8, 2017

Share This Page