<commit_before><?php
/*
Template Name: Post Archive
*/
get_header();
?>

<!-- main content -->

<main id="main-content">

  <!-- main posts loop -->
  <section id="posts">

<?php
  if (is_page()) {
    $posts = get_posts( 'post_type=post' ); 
    if (! empty($posts)) { ?>
      <div class="container container-large">
        <div class="row">
<?php 
      foreach ($posts as $post) {
        setup_postdata( $post );
        get_template_part('archive','entry');
      }
    } else { 
?>
    <article class="u-alert">
    <div class="container container-small">
      <?php _e('Sorry, no posts matched your criteria :{'); ?>
    </div>
    </article>
<?php
    }
  } else {
    if( have_posts() ) { 
?>
    <div class="container container-large">
      <div class="row">
<?php
      while( have_posts() ) {
        the_post();
        get_template_part('archive','entry');
      } 
?>
      </div>
    </div>
<?php
    } else {
?>
    <article class="u-alert">
      <div class="container container-small">
        <?php _e('Sorry, no posts matched your criteria :{'); ?>
      </div>
    </article>
<?php
    } 
  }
?>
      
  <!-- end posts -->
  </section>

  <?php get_template_part('partials/pagination'); ?>

<!-- end main-content -->

</main>

<?php
get_footer();
?><commit_msg>set $entry_id.  include archive-entry to use global $entry_id<commit_after><?php
/*
Template Name: Post Archive
*/
get_header();

$num_posts = 12;
?>

<!-- main content -->

<main id="main-content">

  <!-- main posts loop -->
  <section id="posts">

<?php
  if (is_page()) {
    $posts = get_posts( 'post_type=post&posts_per_page=' . $num_posts ); 
  } else {
    $post_type = get_post_type();
    $posts = get_posts( 'post_type=' . $post_type . '&posts_per_page=' . $num_posts ); 
  }
  if (! empty($posts)) { ?>
    <div class="container container-large">
      <div class="row">
<?php 
    foreach ($posts as $post) {
      setup_postdata( $post );
      $entry_id = $post->ID;
?>
      <article class="col into-3">
        <?php include(locate_template('archive-entry.php')); ?>
      </article>
<?php
    }
?>
      </div>
    </div>
<?php 
  } else { 
?>
    <article class="u-alert">
    <div class="container container-small">
      <?php _e('Sorry, no posts matched your criteria :{'); ?>
    </div>
    </article>
<?php
  }
?>

  <!-- end posts -->
  </section>

  <?php get_template_part('partials/pagination'); ?>

<!-- end main-content -->

</main>

<?php
get_footer();
?>
{'fraction_non_alphanumeric': 0.20250606305578012, 'fraction_numerical': 0.0012126111560226355, 'mean_word_length': 2.6026200873362444, 'pattern_counts': {'":': 0, '<': 64, '<?xml version=': 0, '>': 65, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '444148', 'n_tokens_mistral': 859, 'n_tokens_neox': 844, 'n_words': 186}