Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

Pete on "How to display latest custom post of a specific custom post type"

$
0
0

I know nothing about php and I'm trying really hard to get this to work. I'm trying to display the latest custom post from a specific custom post type home-loan-news.

This is what i have so far...

<?php query_posts($query_string . '&orderby=menu_order&order=desc&count=1&post_type=home-loan-news'); ?><?php } ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
Latest News: <a href="<?php the_permalink() ?>"><?php the_title(); ?></a><em><?php the_date(); ?></em> -
<?php the_content_limit(10,''); ?> <a href="<?php the_permalink() ?>">read more »</a>
<?php endwhile; else : endif; ?>

A solution would be hugely appreciated :)


Viewing all articles
Browse latest Browse all 8245

Trending Articles