I have a code for a custom page i'm creating that I want to have my own blog archive (formatted customized)
this is my code:
<?php
$args = array(
'posts_per_page' => '-1',
'post_type' => 'post',
'post_status' => 'publish',
'category__in' => $quicksand_categories
);
$query = new WP_Query( $args );
foreach ($query->posts as $item) {
$categories = wp_get_post_categories($item->ID);
?>
<li id="item" class="item" data-id="id-<?php echo $item->ID ?>" data-type="<?php foreach ($categories as $c) { echo $c . ' ';}?>" >
<?php if (get_option('featured') == 'yes') { ?>
<a href="<?php echo get_permalink($item->ID); ?>">
<?php echo get_the_post_thumbnail($item->ID); ?></a>
<?php } ?>
<br />
<?php if(get_option('titles') == 'yes') { ?>
<h2><a href="<?php echo get_permalink($item->ID); ?>">
<?php echo get_the_title($item->ID); ?>
</a></h2>
<?php echo apply_filters('the_content', $item->post_content); ?>
<h6 class="alt-h"><a href="<?php echo get_permalink($item->ID); ?>">READ MORE</a></h6>
<hr/>
<?php } ?>
</li>
<?php } ?>
</ul>
it seems to be working properly, but it doesn't acknowledge the fact that the posts that it's pulling have a "read more" in them. I only want this page to pull the information before the read more of my blog posts, not the entire post.
I originally tried to just use "the_content" but that pulls the contents of the actual page itself not that of the posts. so that's why i'm using
<?php echo apply_filters('the_content', $item->post_content); ?>
I'm probably missing something silly, but any help would be appreciated.