Ready to get started?Download WordPress


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

  1. redefinered
    Posted 1 year 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 1 year 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 1 year 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

About this Topic


No tags yet.