<commit_before><?php
$exclude_posts = array();
$post_tags = array();
$post_types = array('post');
if( is_page('editorial') ) {
  $main_post_object = get_field('main_feature');
  $exclude_posts[] = $main_post_object->ID;
  $second_features = get_field('side_features');
  while( have_rows( 'side_features' ) ){
    the_row();
    $ex_post = get_sub_field( 'feature' );
    $exclude_posts[] = $ex_post->ID;
  }
} elseif( is_single() ) {
  $exclude_posts[] = get_the_ID();
  foreach (get_the_tags() as $tag) {
    $post_tags[] = $tag->term_id;
  }
  $post_types[] = 'city';
  $post_types[] = 'artist';
}
$reservedObj = get_category_by_slug('reserved');
$exclude_cats = array($reservedObj->term_id);

if ( get_query_var( 'paged' ) ) { $paged = get_query_var( 'paged' ); }
elseif ( get_query_var( 'page' ) ) { $paged = get_query_var( 'page' ); }
else { $paged = 1; }
$args = array(
'posts_per_page' => 12,
'post_type' => $post_types,
'order_by' => ['date'],
'order' => 'DESC',
'paged' => $paged,
'post__not_in' => $exclude_posts,
'category__not_in' => $exclude_cats,
);
if( is_single() && !empty($post_tags) ) {
  $args['tag__in'] = $post_tags;
}

$more_query = new WP_Query($args);
if($more_query->have_posts()): $counter = 1; ?>
<?php if( !is_page( 'editorial' ) ): ?>
  <div class="row cc-row d-flex justify-content-center">
    <div class="editorial__title">
      related
    </div>
  </div>
<?php endif; ?>
<div class="row cc-row editorial__block">
  <?php while($more_query->have_posts()): $more_query->the_post(); ?><commit_msg>changing the related reveal code.<commit_after><?php
$exclude_posts = array();
$post_tags = array();
$post_types = array('post');
if( is_page('editorial') ) {
  $main_post_object = get_field('main_feature');
  $exclude_posts[] = $main_post_object->ID;
  $second_features = get_field('side_features');
  while( have_rows( 'side_features' ) ){
    the_row();
    $ex_post = get_sub_field( 'feature' );
    $exclude_posts[] = $ex_post->ID;
  }
} elseif( is_single() ) {
  $exclude_posts[] = get_the_ID();
  foreach (get_the_tags() as $tag) {
    $post_tags[] = $tag->term_id;
  }
  $post_types[] = 'city';
  $post_types[] = 'artist';
}
$reservedObj = get_category_by_slug('reserved');
$exclude_cats = array($reservedObj->term_id);

if ( get_query_var( 'paged' ) ) { $paged = get_query_var( 'paged' ); }
elseif ( get_query_var( 'page' ) ) { $paged = get_query_var( 'page' ); }
else { $paged = 1; }
$args = array(
'posts_per_page' => 12,
'post_type' => $post_types,
'order_by' => ['date'],
'order' => 'DESC',
'paged' => $paged,
'post__not_in' => $exclude_posts,
'category__not_in' => $exclude_cats,
);
if( is_single() && !empty($post_tags) ) {
  $args['tag__in'] = $post_tags;
}

$more_query = new WP_Query($args);
if($more_query->have_posts()): $counter = 1; ?>
<div class="row cc-row d-flex justify-content-center">
  <div class="editorial__title">
    <?php if( !is_page( 'editorial' ) ): ?>
      related
    <?php endif; ?>
  </div>
</div>
<div class="row cc-row editorial__block">
  <?php while($more_query->have_posts()): $more_query->the_post(); ?>
{'fraction_non_alphanumeric': 0.20798182998053213, 'fraction_numerical': 0.0025957170668397143, 'mean_word_length': 5.215725806451613, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 49, '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': '3319574', 'n_tokens_mistral': 1227, 'n_tokens_neox': 1200, 'n_words': 218}