Below is the php code that fires the look on this website http://digestafrica.com/
<?php
if (have_posts()) {
while ( have_posts() ) : the_post();
?>
<div class="td-page-header">
<h1 class="entry-title td-page-title">
<span><?php the_title() ?></span>
</h1>
</div>
<div class="td-pb-padding-side td-page-content">
<?php
the_content();
endwhile;//end loop
}
?>
</div>
And below is the php code that fires the look on http://digestafrica.com/testing/
<!-- latest post-->
<?php
$args = array(
'post_type' => 'post',
'posts_per_page' => 1
);
$latest = new WP_Query($args);
while($latest->have_posts()) : $latest->the_post();
$dontshowthisguy = $post->ID;
?>
<div class="td-page-header">
<h1 class="entry-title td-page-title">
<span><?php the_title() ?></span>
</h1>
</div>
<div class="td-pb-padding-side td-page-content">
<?php the_content(); ?>
</div>
<?php endwhile; wp_reset_query(); ?>
<!-- Promoted Post -->
<?php
$args = array(
'post_type' => 'post',
'posts_per_page' => 1,
'cat' => 502
);
$promotedpost = new WP_Query($args);
while($promotedpost->have_posts()) : $promotedpost->the_post();
$promoted = $post->ID;
?>
<div class="td-page-header">
<h1 class="entry-title td-page-title">
<span><?php the_title() ?></span>
</h1>
</div>
<div class="td-pb-padding-side td-page-content">
<?php the_content(); ?>
</div>
<?php endwhile; wp_reset_query(); ?>
<!-- Rest of the previous posts -->
<?php
$args = array(
'post_type' => 'post',
'post__not_in' => array($dontshowthisguy,$promoted)
);
$prevposts = new WP_Query($args);
while($prevposts->have_posts()) : $prevposts->the_post();
?>
<div class="td-page-header">
<h1 class="entry-title td-page-title">
<span><?php the_title() ?></span>
</h1>
</div>
<div class="td-pb-padding-side td-page-content">
<?php the_content(); ?>
</div>
<?php endwhile; wp_reset_query(); ?>
All blocks of code i.e the loops, are encapsulated by these two divs below
<div class="td-pb-span8 td-main-content" role="main">
<div class="td-ss-main-content">
<----the loop goes here -----!>
</div>
</di>
So I am confused as to why the first loop, which came with the theme produces this kind of look http://digestafrica.com and my custom loop produces this kind of look http://digestafrica.com/testing/ with all the formatting gone
That is my challenge
Thanks
502, but in the code it's set to27(see it under the<!-- Promoted Post -->). Was that27a typo?