The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Custom Post Type UI
[resolved] Display 3 custom post on the homepage (3 posts)

  1. redefinered
    Posted 3 years ago #

    Hi devs, I am Red and i am currently building a website for a fighting club and i need to create a custom post type for "events" and I need to show 3 recent post types on a portion on my homepage. I hope my question is clear enough. Thanks so much...


  2. lord_dev
    Posted 3 years ago #

    Hey Red,

    I use something similar to:

    $args = array( 'post_type' => 'events', 'posts_per_page' => 4 );
                                $loop = new WP_Query( $args );
                                while ( $loop->have_posts() ) : $loop->the_post();
    //please your display code here e.g. the_title();

    Hope this helps.

  3. Michael Beckwith
    Plugin Author

    Posted 3 years ago #

    redefinered the snippet that lord_dev posted will put you on the right path. The plugin itself doesn't handle content display from the custom post types or taxonomies, it just registers them for you easily.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Type UI
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.