This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Custom Post Type Builder

9 years ago · Last reply by Alex S 9 years ago

Hi

How do you use the custom post type builder to create a custom post type that captures the date of an event and then use that date to sort how the custom posts are appear using the Create Blog or Post Loop widget?

Thanks

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

1
  1. Alex S Staff 9 years, 2 months ago

    Hi Hulmie,

    This is possible. Once you had created your post type (make sure the post type supports custom fields you would create a new “event”. Open the Screens options at the top of the page and ensure that the custom field box is enabled (you’ll only have to do this part once).

    Then scroll down to the custom fields box and click Enter New for the custom field. Input the field name, for example, event_date then input the data, for example, 19/08/17 then click Add Custom Field and save.

    So all up, it would look a little like this:

    Do this for a few events and then create an events page (WP AdminPagesAdd New) and enable Page Builder. Add a post loop widget and then click Build posts query. Set the post type field to your newly created post type and then set the additional field to:

    meta_key=event_date&orderby=meta_value_num&order=DESC

    You can change the order to ascending by changing DESC to ASC

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread