pattern_meta=is_web gets the patterns for desktop, not mobile or premium
tags=pattern gets only pattens, no layouts (page templates)
per_page=200 is not limited to 100. By default returns all the patterns
Notes:
This endpoint is cached. It's the same used in the ETK plugin. See PCYsg-uUe-p2
Pattern are translated. the lang code is in the route /en
References for categories
Core
{ name: "banner", label: "Banners" }
{ name: "buttons", label: "Buttons", description: "Patterns that contain buttons and call to actions." }
{ name: "columns", label: "Columns", description: "Multi-column patterns with more complex layouts." }
{ name: "text", label: "Text", description: "Patterns containing mostly text." }
{ name: "query", label: "Posts", description: "Display your latest posts in lists, grids or other layouts." }
{ name: "featured", label: "Featured", description: "A set of high quality curated patterns." }
{ name: "call-to-action", label: "Call to Action", description: "Sections whose purpose is to trigger a specific action." }
{ name: "team", label: "Team", description: "A variety of designs to display your team members." }
{ name: "testimonials", label: "Testimonials", description: "Share reviews and feedback about your brand/business." }
{ name: "services", label: "Services", description: "Briefly describe what your business does and how you can help." }
{ name: "contact", label: "Contact", description: "Display your contact information." }
{ name: "about", label: "About", description: "Introduce yourself." }
{ name: "portfolio", label: "Portfolio", description: "Showcase your latest work." }
{ name: "gallery", label: "Gallery", description: "Different layouts for displaying images." }
{ name: "media", label: "Media", description: "Different layouts containing video or audio." }
{ name: "posts", label: "Posts", description: "Display your latest posts in lists, grids or other layouts." }
{ name: "footer", label: "Footers", description: "A variety of footer designs displaying information and site navigation." }
{ name: "header", label: "Headers", description: "A variety of header designs displaying your site title and navigation." }
{ name: "forms", label: "Forms" }
Related to WP Patterns 101 pekYwv-51-p2 FG PTK API PCYsg-uUe-p2
What
Part 1
Dotcom patterns
in the assemblerPart 2
pattern_meta
tag, sayshow-in-assembler
to fetch only desired patterns.Why
To have more patterns in the assembler.
How
Fetch all patterns from
dotcompatterns
using the PTK API endpoint the endpoint: https://public-api.wordpress.com/rest/v1.1/ptk/patterns/en?per_page=200&tags=pattern&pattern_meta=is_webRequired query string:
pattern_meta=is_web
gets the patterns for desktop, not mobile or premiumtags=pattern
gets only pattens, no layouts (page templates)per_page=200
is not limited to 100. By default returns all the patternsNotes:
/en
References for categories
Core
Dotcom