Skip to main content
deleted 14 characters in body
Source Link
David
  • 113
  • 6
if ( $r->have_posts() ) :
?>
<?php print_r ($r); echo wp_kses_post( $args['before_widget'] ); ?>
<?php
if ( $title ) {
    echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
}
?>
<div class="posts-grid">
    <div class="row">
    <?php while ( $r->have_posts() ) : $r->the_post(); ?>
        <div class="col-md-4 col-sm-6">
        <?php get_template_part( 'content', get_post_format() ); ?>
        </div>
    <?php endwhile; ?>
    </div>
</div>
<?php echo wp_kses_post( $args['after_widget'] ); ?>
<?php
wp_reset_postdata();

endif;
if ( $r->have_posts() ) :
?>
<?php print_r ($r); echo wp_kses_post( $args['before_widget'] ); ?>
<?php
if ( $title ) {
    echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
}
?>
<div class="posts-grid">
    <div class="row">
    <?php while ( $r->have_posts() ) : $r->the_post(); ?>
        <div class="col-md-4 col-sm-6">
        <?php get_template_part( 'content', get_post_format() ); ?>
        </div>
    <?php endwhile; ?>
    </div>
</div>
<?php echo wp_kses_post( $args['after_widget'] ); ?>
<?php
wp_reset_postdata();

endif;
if ( $r->have_posts() ) :
?>
<?php echo wp_kses_post( $args['before_widget'] ); ?>
<?php
if ( $title ) {
    echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
}
?>
<div class="posts-grid">
    <div class="row">
    <?php while ( $r->have_posts() ) : $r->the_post(); ?>
        <div class="col-md-4 col-sm-6">
        <?php get_template_part( 'content', get_post_format() ); ?>
        </div>
    <?php endwhile; ?>
    </div>
</div>
<?php echo wp_kses_post( $args['after_widget'] ); ?>
<?php
wp_reset_postdata();

endif;
added 652 characters in body
Source Link
David
  • 113
  • 6

For reference, this is the code that follows the above query:

if ( $r->have_posts() ) :
?>
<?php print_r ($r); echo wp_kses_post( $args['before_widget'] ); ?>
<?php
if ( $title ) {
    echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
}
?>
<div class="posts-grid">
    <div class="row">
    <?php while ( $r->have_posts() ) : $r->the_post(); ?>
        <div class="col-md-4 col-sm-6">
        <?php get_template_part( 'content', get_post_format() ); ?>
        </div>
    <?php endwhile; ?>
    </div>
</div>
<?php echo wp_kses_post( $args['after_widget'] ); ?>
<?php
wp_reset_postdata();

endif;

For reference, this is the code that follows the above query:

if ( $r->have_posts() ) :
?>
<?php print_r ($r); echo wp_kses_post( $args['before_widget'] ); ?>
<?php
if ( $title ) {
    echo wp_kses_post( $args['before_title'] . $title . $args['after_title'] );
}
?>
<div class="posts-grid">
    <div class="row">
    <?php while ( $r->have_posts() ) : $r->the_post(); ?>
        <div class="col-md-4 col-sm-6">
        <?php get_template_part( 'content', get_post_format() ); ?>
        </div>
    <?php endwhile; ?>
    </div>
</div>
<?php echo wp_kses_post( $args['after_widget'] ); ?>
<?php
wp_reset_postdata();

endif;
added 134 characters in body
Source Link
David
  • 113
  • 6

From my research, I really thought this would work. I However, it seems that after $r = array_merge( $r, $little_array->posts );, $r comes up empty. print_r($r); prints nothing.

I appreciate the help.

From my research, I really thought this would work. I appreciate the help.

From my research, I really thought this would work. However, it seems that after $r = array_merge( $r, $little_array->posts );, $r comes up empty. print_r($r); prints nothing.

I appreciate the help.

Source Link
David
  • 113
  • 6
Loading