WordPress.org

Ready to get started?Download WordPress

Forums

Types - Custom Fields and Custom Post Types Management
[resolved] How to display (4 posts)

  1. William
    Member
    Posted 1 year ago #

    Hi all,

    I have a question about the Plugin Types.
    How do I display the Post Types in my index.php?

    I have seen this: http://codex.wordpress.org/Template_Tags/get_posts
    But what must I add to display the Post Types?

    Thanks!

    http://wordpress.org/extend/plugins/types/

  2. William
    Member
    Posted 1 year ago #

    Solution:

    <?php query_posts(array( 'post_type' => 'name of type' )); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <?php endif; ?>
  3. kelsey.rahenkamp
    Member
    Posted 4 months ago #

    If I use the code above, where do I put it in my code? In the index.php, should it go first, last or in between something?

  4. William
    Member
    Posted 4 months ago #

    Yes, you can this put in your index.php. Not between another loop.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.