• When Child Theme Configurator analyzes Hueman theme, it displays an error and recommends contact to theme developers.

    Notice: Undefined variable: post_id in <my-host-link>/strategycon.ru/wp-content/themes/hueman-child/parts/post-list-author-date.php on line 6

    This is the code of this file on my site:

    <?php
    /*  Print the post date. Compatible with Google Structured data. Must be used in the WordPress loop
    * @php return html string
    /* ------------------------------------ */
    ?>
    <?php $post_type = get_post_type( $post_id ) ?>
    <?
    if ($post_type == 'post') {
    ?>
    <p class="post-date">
    <time class="published updated" datetime="<?php the_time('Y-m-d H:i:s'); ?>"><?php the_time( get_option('date_format') ); ?></time>
    </p>
    <?
    }
    ?>
    
    <?php if ( hu_is_checked('structured-data') ) : ?>
      <p class="post-byline" style="display:none">&nbsp;<?php _e('by','hueman'); ?>
        <span class="vcard author">
          <span class="fn"><?php the_author_posts_link(); ?></span>
        </span> &middot; Published <span class="published"><?php echo get_the_date( get_option('date_format') ); ?></span>
        <?php if( get_the_modified_date() != get_the_date() ) : ?> &middot; Last modified <span class="updated"><?php the_modified_date( get_option('date_format') ); ?></span><?php endif; ?>
      </p>
    <?php endif ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error with theme in Child Theme Configurator’ is closed to new replies.