Comprehensive developer toolkit providing reusable skills for Java/Spring Boot, TypeScript/NestJS/React/Next.js, Python, PHP, AWS CloudFormation, AI/RAG, DevOps, and more.
82
82%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Risky
Do not use without reviewing
Complete reference for integrating Advanced Custom Fields (ACF) with Sage WordPress themes.
# Install ACF Pro via Composer
composer require wp-premium/acf-pro
# Or install ACF Free
composer require advanced-custom-fields/advanced-custom-fieldsText:
<h1>{{ get_field('heading') }}</h1>Textarea:
<div class="description">
{{ get_field('description') }}
</div>Number:
@php($price = get_field('price'))
<span class="price">${{ number_format($price, 2) }}</span>Email/URL:
<a href="mailto:{{ get_field('email') }}">{{ get_field('email') }}</a>
<a href="{{ get_field('website') }}">Visit Website</a>Image (Return Format: Image Array):
@php($image = get_field('hero_image'))
@if ($image)
<img
src="{{ $image['url'] }}"
alt="{{ $image['alt'] }}"
width="{{ $image['width'] }}"
height="{{ $image['height'] }}"
>
@endifImage (Return Format: URL):
<img src="{{ get_field('logo') }}" alt="Logo">Gallery:
@php($gallery = get_field('gallery'))
@if ($gallery)
<div class="gallery">
@foreach ($gallery as $image)
<img src="{{ $image['url'] }}" alt="{{ $image['alt'] }}">
@endforeach
</div>
@endifFile:
@php($file = get_field('download'))
@if ($file)
<a href="{{ $file['url'] }}" download>Download {{ $file['filename'] }}</a>
@endifSelect:
@php($status = get_field('status'))
<span class="status status-{{ $status }}">{{ $status }}</span>Checkbox (Return Format: Value):
@php($services = get_field('services'))
@if ($services && is_array($services))
<ul class="services">
@foreach ($services as $service)
<li>{{ $service }}</li>
@endforeach
</ul>
@endifRadio:
@php($layout = get_field('layout'))
<div class="container container-{{ $layout }}">
{{ the_content() }}
</div>Post Object (Single):
@php($featured_post = get_field('featured_post'))
@if ($featured_post)
@php(setup_postdata($GLOBALS['post'], $featured_post))
<article>
<h2>{{ the_title() }}</h2>
{{ the_excerpt() }}
</article>
@php(wp_reset_postdata())
@endifPost Object (Multiple):
@php($posts = get_field('related_posts'))
@if ($posts)
<div class="related-posts">
@foreach ($posts as $post)
@php(setup_postdata($GLOBALS['post'], $post))
<h3>{{ the_title() }}</h3>
@endforeach
@php(wp_reset_postdata())
</div>
@endifPage Link:
@php($link = get_field('cta_link'))
@if ($link)
<a href="{{ $link['url'] }}"
target="{{ $link['target'] ?: '_self' }}"
class="btn">
{{ $link['title'] ?: 'Learn More' }}
</a>
@endifRelationship:
@php($related = get_field('related_projects'))
@if ($related)
@foreach ($related as $p)
@php($project = get_post($p->ID))
<h3>{{ $project->post_title }}</h3>
<a href="{{ get_permalink($project->ID) }}">View Project</a>
@endforeach
@endifTaxonomy:
@php($categories = get_field('featured_categories'))
@if ($categories)
<ul>
@foreach ($categories as $category)
<li>
<a href="{{ get_term_link($category) }}">
{{ $category->name }}
</a>
</li>
@endforeach
</ul>
@endifUser:
@php($author = get_field('author'))
@if ($author)
<div class="author">
<img src="{{ get_avatar_url($author['ID']) }}" alt="{{ $author['display_name'] }}">
<span>{{ $author['display_name'] }}</span>
</div>
@endifBasic Repeater:
@if (have_rows('testimonials'))
<div class="testimonials">
@while (have_rows('testimonials'))
@php(the_row())
<blockquote>
<p>{{ get_sub_field('testimonial_text') }}</p>
<cite>{{ get_sub_field('author_name') }}</cite>
</blockquote>
@endwhile
</div>
@endifRepeater with Sub-fields:
@if (have_rows('pricing_plans'))
<div class="pricing">
@while (have_rows('pricing_plans'))
@php(the_row())
<div class="plan">
<h3>{{ get_sub_field('plan_name') }}</h3>
<div class="price">{{ get_sub_field('price') }}/mo</div>
<ul class="features">
@while (have_rows('features'))
@php(the_row())
<li>{{ get_sub_field('feature_name') }}</li>
@endwhile
</ul>
</div>
@endwhile
</div>
@endifNested Repeater:
@if (have_rows('teams'))
@while (have_rows('teams'))
@php(the_row())
<div class="team">
<h2>{{ get_sub_field('team_name') }}</h2>
@if (have_rows('team_members'))
<ul class="members">
@while (have_rows('team_members'))
@php(the_row())
<li>{{ get_sub_field('member_name') }}</li>
@endwhile
</ul>
@endif
</div>
@endwhile
@endifBasic Flexible Content:
@if (have_rows('page_sections'))
@while (have_rows('page_sections'))
@php(the_row())
@switch(get_row_layout())
@case('hero_section')
@include('components.sections.hero')
@break
@case('features_grid')
@include('components.sections.features')
@break
@case('cta_banner')
@include('components.sections.cta')
@break
@endswitch
@endwhile
@endifHero Section Component (resources/views/components/sections/hero.blade.php):
@php
$title = get_sub_field('hero_title');
$subtitle = get_sub_field('hero_subtitle');
$background = get_sub_field('background_image');
@endphp
<section class="hero">
@if ($background)
<div class="hero-bg" style="background-image: url({{ $background['url'] }})"></div>
@endif
<div class="hero-content">
<h1>{{ $title }}</h1>
<p>{{ $subtitle }}</p>
</div>
</section>Basic Group:
@php($hero = get_field('hero_group'))
@if ($hero)
<section class="hero">
<h1>{{ $hero['title'] }}</h1>
<p>{{ $hero['description'] }}</p>
@if ($hero['background_image'])
<img src="{{ $hero['background_image']['url'] }}" alt="">
@endif
</section>
@endifGroup with Conditional:
@php($settings = get_field('display_settings'))
@if ($settings && $settings['show_section'])
<div class="custom-section {{ $settings['css_class'] }}">
{{ the_content() }}
</div>
@endifCloned Field Display:
@php($cloned_fields = get_field('cloned_content'))
@if ($cloned_fields)
<div class="cloned-content">
<h2>{{ $cloned_fields['headline'] }}</h2>
<p>{{ $cloned_fields['description'] }}</p>
@if ($cloned_fields['show_button'])
<a href="{{ $cloned_fields['button_link'] }}" class="btn">
{{ $cloned_fields['button_text'] }}
</a>
@endif
</div>
@endifIn app/setup.php:
add_action('acf/init', function () {
if (function_exists('acf_add_options_page')) {
acf_add_options_page([
'page_title' => 'Theme Settings',
'menu_title' => 'Theme Settings',
'menu_slug' => 'theme-settings',
'capability' => 'edit_posts',
]);
acf_add_options_sub_page([
'page_title' => 'Header Settings',
'menu_title' => 'Header',
'parent_slug' => 'theme-settings',
]);
}
});@php($company_name = get_field('company_name', 'option'))
@if ($company_name)
<footer>
<p>© {{ date('Y') }} {{ $company_name }}</p>
</footer>
@endifOptions with Repeater:
@if (have_rows('social_links', 'option'))
<div class="social-links">
@while (have_rows('social_links', 'option'))
@php(the_row())
<a href="{{ get_sub_field('url', 'option') }}" class="social-icon">
{{ get_sub_field('icon', 'option') }}
</a>
@endwhile
</div>
@endifField Has Value:
@if (get_field('featured_image'))
{{-- Display section --}}
@endifField Equals Value:
@if (get_field('layout_type') === 'full-width')
<div class="container-full">
@else
<div class="container">
@endif
{{ the_content() }}
</div>Multiple Conditions:
@php($type = get_field('content_type'))
@if ($type === 'video')
@include('components.video')
@elseif ($type === 'gallery')
@include('components.gallery')
@else
@include('components.default')
@endifFormat ACF Image:
// In app/helpers.php
function format_acf_image($image, $size = 'large') {
if (!$image) return null;
if (is_array($image)) {
return [
'url' => $image['url'],
'alt' => $image['alt'] ?? '',
'title' => $image['title'] ?? '',
];
}
return [
'url' => $image,
'alt' => '',
'title' => '',
];
}Load fields efficiently: Use get_fields() to load all fields at once
@php($fields = get_fields(get_the_ID()))
<h1>{{ $fields['title'] }}</h1>
<p>{{ $fields['description'] }}</p>Cache repeater counts:
@if (have_rows('items') && count(get_field('items')) > 0)Use formatted values: ACF returns formatted values by default for better performance
Disable loading on specific posts:
add_filter('acf/load_value', '__return_false');plugins
developer-kit-ai
skills
chunking-strategy
prompt-engineering
developer-kit-aws
skills
aws
aws-cli-beast
aws-cost-optimization
aws-drawio-architecture-diagrams
aws-sam-bootstrap
aws-cloudformation
aws-cloudformation-auto-scaling
references
aws-cloudformation-bedrock
references
aws-cloudformation-cloudfront
references
aws-cloudformation-cloudwatch
references
aws-cloudformation-dynamodb
references
aws-cloudformation-ec2
aws-cloudformation-ecs
references
aws-cloudformation-elasticache
aws-cloudformation-iam
references
aws-cloudformation-lambda
references
aws-cloudformation-rds
aws-cloudformation-s3
references
aws-cloudformation-security
references
aws-cloudformation-task-ecs-deploy-gh
aws-cloudformation-vpc
developer-kit-core
skills
developer-kit-java
skills
aws-lambda-java-integration
aws-rds-spring-boot-integration
aws-sdk-java-v2-bedrock
aws-sdk-java-v2-core
aws-sdk-java-v2-dynamodb
aws-sdk-java-v2-kms
aws-sdk-java-v2-lambda
aws-sdk-java-v2-messaging
aws-sdk-java-v2-rds
aws-sdk-java-v2-s3
aws-sdk-java-v2-secrets-manager
graalvm-native-image
langchain4j
langchain4j-mcp-server-patterns
langchain4j-ai-services-patterns
references
langchain4j-mcp-server-patterns
references
langchain4j-rag-implementation-patterns
references
langchain4j-spring-boot-integration
langchain4j-testing-strategies
langchain4j-tool-function-calling-patterns
langchain4j-vector-stores-configuration
references
qdrant
references
spring-ai-mcp-server-patterns
references
spring-boot-actuator
spring-boot-cache
spring-boot-crud-patterns
spring-boot-dependency-injection
spring-boot-event-driven-patterns
spring-boot-openapi-documentation
spring-boot-project-creator
spring-boot-resilience4j
spring-boot-rest-api-standards
spring-boot-saga-pattern
spring-boot-security-jwt
assets
references
scripts
spring-boot-test-patterns
spring-data-jpa
references
spring-data-neo4j
references
unit-test-application-events
unit-test-bean-validation
unit-test-boundary-conditions
unit-test-caching
unit-test-config-properties
unit-test-controller-layer
unit-test-exception-handler
unit-test-json-serialization
unit-test-mapper-converter
unit-test-parameterized
unit-test-scheduled-async
unit-test-service-layer
unit-test-utility-methods
unit-test-wiremock-rest-api
developer-kit-php
skills
aws-lambda-php-integration
developer-kit-python
skills
aws-lambda-python-integration
developer-kit-tools
developer-kit-typescript
skills
aws-lambda-typescript-integration
better-auth
drizzle-orm-patterns
dynamodb-toolbox-patterns
references
nestjs
nestjs-best-practices
nestjs-code-review
nestjs-drizzle-crud-generator
scripts
nextjs-app-router
nextjs-authentication
nextjs-code-review
nextjs-data-fetching
references
nextjs-deployment
nextjs-performance
nx-monorepo
react-code-review
react-patterns
references
shadcn-ui
tailwind-css-patterns
references
tailwind-design-system
references
turborepo-monorepo
typescript-docs
typescript-security-review
zod-validation-utilities