loops - Create archive for Custom Post Type : wordpress -
i have created archive.php custom post type.
archive-custom_posttype.php
within have placed standard loop.
`<?php get_header(); if (have_posts()) : while (have_posts()) : the_post(); the_title(); the_excerpt(); endwhile; endif; get_sidebar(); get_footer(); ?>`
great! works.
where fall down when trying use current_post; , found_posts;
they not giving me values when echo them loop.
the actual archive page layout more complex , part of making work need current_post , found_post.
any ideas appreciated!
are echoing found_posts
referencing global wp_query
variable? if not, try:
echo $wp_query->found_posts;
Comments
Post a Comment