Working with CPTs, custom fields and dynamic content in Elementor

Are you using custom post types and fields on your website and are curious how Elementor can display the content easily? In this meetup, I’ll create an archive and single template for a custom post type and use the dynamic content feature of Elementor to display the content on the front end.

Check out a recording of the live presentation on the WordCamp Miami YouTube channel (starting at 46:58).

Setup

  • Site in Local
  • Theme
  • Plugins
  • Create a CPT for Books
    • Has archive true
    • Slug set to plural version
  • Create custom fields for author, date read, link
    • Will use featured image and editor as well
  • Add data for a few books

Single

  • Each individual book
  • yourdomain.com/book/your-book
  • What does it look like by default? Theme settings
  • Creating a new single
  • Templates, Theme Builder, Single Post
  • Settings, Preview Settings, Preview Dynamic Content As, Book, choose one
  • Fields
    • Featured image
    • Post title
    • Post content
    • Text Editor, Dynamic Tags, ACF Field; then choose the key — for author and date read
      • Advanced — add before or after text
    • Button, Dynamic Tags (under link); then choose the key
  • Publish, Add Condition, Books, All

Archive

  • A list of books
  • yourdomain.com/books
  • What does it look like by default? Theme settings
  • Templates, Theme Builder, Archive
  • Settings, Preview Settings, Preview Dynamic Content As, Books
  • Fields
    • Archive Title, turn off include context
    • Archive Posts
  • Publish, Add Condition, Books Archive

ACF Options

  • With ACF Pro, you can create an options page
  • Create custom fields for use anywhere on the site
  • Add dynamic content using the same methods as above on any template

Examples

Want to learn more about Elementor? Check out my presentation on Elementor — The Whats, Whys and Hows.

If you enjoyed this presentation, please connect with me on Twitter, Instagram and LinkedIn.

Scroll to Top