소스 정보
- 저장소
- wpgaurav/WordPress-skills
- 최근 소스 활동
- 2026년 3월 30일 16:11
- 감지된 SKILL.md 언어
- 영어
- 스타
- 14
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/wpgaurav/WordPress-skills --skill bricks-templates명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Author Bricks Builder (WordPress) layouts, templates, and full designs as paste-ready JSON. Use for any Bricks task — sections, pages, headers/footers, query loops, ACF/dynamic data, faceted filters, conditions, interactions/animations, popups, WooCommerce templates, custom elements, or hooks. Verified against Bricks 2.3.6 source.
Use when pushing content, docs, posts, changelogs, or other updates to Fluent Community spaces through the Fluent Community REST API.
Generate or edit design for WordPress Gutenberg blocks using Greenshift/GreenLight plugin. Convert any data to wordpress blocks or convert greenshift blocks back to html + css + js. Use when user asks to create design with Greenshift or Greenlight blocks for wordpress site, convert anything to wordpress blocks or build charts in content. Triggers on keywords: wordpress, gutenberg, greenshift, greenlight, convert to wordpress, convert greenshift blocks to vanilla html, build chart.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | bricks-templates |
| description | Create and work with Bricks templates programmatically. |
This skill covers creating and working with Bricks templates programmatically.
Bricks supports these template types (stored in _bricks_template_type meta):
| Type | Purpose | Meta Key for Content |
|---|---|---|
header | Site header | _bricks_page_header_2 |
footer | Site footer | _bricks_page_footer_2 |
content | Single post/page content | _bricks_page_content_2 |
section | Reusable section | _bricks_page_content_2 |
archive | Archive pages | _bricks_page_content_2 |
search | Search results | _bricks_page_content_2 |
error | 404 error page | _bricks_page_content_2 |
popup | Popup/modal | _bricks_page_content_2 |
password_protection | Password protected content | _bricks_page_content_2 |
// Post type slug
BRICKS_DB_TEMPLATE_SLUG = 'bricks_template'
// Taxonomies
BRICKS_DB_TEMPLATE_TAX_TAG = 'template_tag'
BRICKS_DB_TEMPLATE_TAX_BUNDLE = 'template_bundle'
/**
* Create a Bricks template programmatically
*/
function create_bricks_template( $title, $type, $elements = [] ) {
// Create the template post
$template_id = wp_insert_post( [
'post_title' => $title,
'post_type' => BRICKS_DB_TEMPLATE_SLUG,
'post_status' => 'publish',
] );
if ( is_wp_error( $template_id ) ) {
return $template_id;
}
// Set template type
update_post_meta( $template_id, BRICKS_DB_TEMPLATE_TYPE, $type );
// Set template content based on type
$meta_key = BRICKS_DB_PAGE_CONTENT;
if ( $type === 'header' ) {
$meta_key = BRICKS_DB_PAGE_HEADER;
} elseif ( $type === 'footer' ) {
$meta_key = BRICKS_DB_PAGE_FOOTER;
}
if ( ! empty( $elements ) ) {
update_post_meta( $template_id, $meta_key, $elements );
}
return $template_id;
}
Templates store elements as arrays with this structure:
$elements = [
[
'id' => 'abc123', // 6-character alphanumeric ID
'name' => 'section',
'parent' => 0, // 0 for root, or parent element ID
'children' => [ 'def456' ], // Child element IDs
'settings' => [
// Element-specific settings
],
],
[
'id' => 'def456',
'name' => 'heading',
'parent' => 'abc123',
'children' => [],
'settings' => [
'text' => 'Hello World',
'tag' => 'h1',
],
],
];
function create_header_template() {
$elements = [
[
'id' => Bricks\Helpers::generate_random_id( false ),
'name' => 'section',
'parent' => 0,
'children' => [],
'settings' => [
'tag' => 'header',
'_padding' => [
'top' => '20px',
'right' => '40px',
'bottom' => '20px',
'left' => '40px',
],
],
],
];
return create_bricks_template( 'My Header', 'header', $elements );
}
Templates use conditions to determine when they apply. Set via _bricks_template_settings meta:
$template_settings = [
'templateConditions' => [
[
'main' => 'postType',
'sub' => 'post',
'compare' => '==',
],
],
];
update_post_meta( $template_id, BRICKS_DB_TEMPLATE_SETTINGS, $template_settings );
| Main | Sub Options | Description |
|---|---|---|
entireWebsite | - | Applies everywhere |
frontpage | - | Front page only |
postType | post, page, {cpt} | Specific post type |
archiveType | author, date, post_tag, category | Archive pages |
searchResults | - | Search results page |
error | - | 404 page |
// In PHP
echo do_shortcode( '[bricks_template id="123"]' );
// In Bricks element
// Use the Template element and select the template
// Get template elements
$elements = get_post_meta( $template_id, BRICKS_DB_PAGE_CONTENT, true );
// Render elements
if ( ! empty( $elements ) && is_array( $elements ) ) {
echo \Bricks\Frontend::render_data( $elements );
}
REST API namespace: bricks/v1/
| Endpoint | Method | Purpose |
|---|---|---|
/get-templates/ | GET | Get all templates |
/get-templates/{id} | GET | Get specific template |
/get-templates-data/ | GET | Get templates with metadata |
/get-template-authors/ | GET | Get template authors |
/get-template-bundles/ | GET | Get template bundles |
/get-template-tags/ | GET | Get template tags |
// Get template type
$type = \Bricks\Templates::get_template_type( $template_id );
// Get templates by type
$templates = \Bricks\Templates::get_templates_by_type( 'section' );
// Get templates list for select control
$list = \Bricks\Templates::get_templates_list( ['section', 'content'] );
// Check if post is a Bricks template
$is_template = \Bricks\Helpers::is_bricks_template( $post_id );
Enable remote template access in settings, then query from other sites:
// Settings to enable
// Bricks > Settings > Templates
// - Enable "My Templates Access"
// - Optionally set whitelist URLs
// - Optionally set password
Templates can be exported as JSON:
// Export structure
$export = [
'content' => $elements,
'templateType' => $type,
'globalClasses' => $classes,
'globalElements' => $global_elements,
];
// Modify templates data from API
add_filter( 'bricks/api/get_templates_data', function( $templates_data ) {
// Modify templates data
return $templates_data;
} );
// Control template access
add_filter( 'bricks/get_templates', function( $templates, $args ) {
// Filter templates based on $args['site'], $args['licenseKey'], etc.
return $templates;
}, 10, 2 );
// After template import
add_action( 'bricks/template/after_import', function( $template_id, $data ) {
// Process imported template
}, 10, 2 );
\Bricks\Helpers::generate_random_id( false ) for element IDs