A Cozmoslabs Product
Documentation / Swift Templates

Swift Templates

WCK Swift Templates is available only in WordPress Creation Kit Pro version. It allows you to build your Front End Templates directly from the WordPress Admin UI, without writing any PHP code.

Overview of Swift Templates

In order to create a Swift Template go to WCK -> Swift Templates and click on Add New.

WordPress Creation Kit - Swift Templates - Add New Swift Template

Inside the Swift Template we can set the Swift Template Arguments, Query Arguments and Swift Templates – Archive and Single Template.

WordPress Creation Kit - Swift Templates - Posts List

Swift Template Arguments

In the Swift Template Arguments tab we can select a Custom Post Type that our Archive and Single Templates will be based on. We can create our own Custom Post Type using WCK Custom Post Type Creator.

WordPress Creation Kit - Swift Templates - Swift Templates Arguments

Query Arguments

The Query Arguments interface allows you to quickly add some of the Query Arguments that are possible with WP_Query().

Query Arguments:

  1. Posts Per Page
  2. Order
  3. Order By
  4. Author ID
  5. Author nicename (not name)
  6. Category ID
  7. Category Slug
  8. Tag ID
  9. Tag Slug
  10. Post Parent ID
  11. Year
  12. Month
  13. Week
  14. Day
  15. Hour
  16. Minute
  17. Second
  18. Meta Key
  19. Meta Value
  20. Meta Value Numeric
  21. Meta Compare

To see accepted values just click the link “see accepted values” under the drop-down and a lightbox will appear with possible ( Query Arguments / Value ) combinations.

IMPORTANT: After this step make sure to “Publish” your Swift Template so it can generate all the variables needed at the next step.

WordPress Creation Kit - Swift Templates - Query Arguments - Post Per Page

Swift Templates

WCK Swift Templates allows you to create Archive and Single Templates for your Custom Post Types, Posts or Pages without writing any PHP code. Inside the Templates you can display all the Custom Fields and Custom Taxonomies. Usually the default WordPress Archive and Single Templates only displays the Post Title and Content.

Archive Template

In the Swift Template tab we can start building the Archive Template. In the right side you will see a list of all the available variables.

WordPress Creation Kit - Swift Templates - Default Archive Template

Single Template

Below the Archive Template we can start building the Single Template. In the right side you will see a list of all the available variables.

WordPress Creation Kit - Swift Templates - Default Single Template

Make sure to mark the checkbox below the Single Template Editor to use it on all posts for the selected Custom Post Type.

Note: To properly display the WYSIWYG Editor Field used in the Swift Template, add the variable with 3 curly braces (3 mustaches): {{{ custom_field }}}

Swift Template Shortcode

In order to display the Swift Template we will need to create a page and add the generated shortcode inside.

WordPress Creation Kit - Swift Templates - Shortcode

Display Custom Post Types, Custom Fields and Custom Taxonomies with Swift Templates

After creating your Custom Post Types, Custom Fields and Custom Taxonomies, Swift Templates lets you display them in your current WordPress theme with just a couple of clicks.

With Swift Templates you can:

  1. Display Custom Fields in WordPress Pages (Posts or Custom Post Types) with no coding
  2. Create Archive Templates for your Custom Post Types (Pages or Posts)
  3. Create Single Templates for your Custom Post Types (Pages or Posts)
  4. Create Taxonomy Archive Templates with no coding
  5. Create Taxonomy Single Templates with no coding
  6. Custom Query Arguments

All of this without writing any PHP code or messing with any of the template files.

Swift Templates turns a time consuming and error prone process that was previously only accessible to developers into a straight forward UI that with a little bit of HTML and CSS allows you to develop complex WordPress sites.

The Ultimate Membership Bundle

Combine the power of Profile Builder with Paid Member Subscriptions to set up user registration, memberships, and recurring revenue.

Get 25% off with the bundle

Help & Support

We’re here to help you every step of the way.

Open a Support Ticket