Loading...
Loading...
Use this skill for WordPress development with Impreza theme and WPBakery Page Builder. Triggers include: converting designs (described, visual, or Figma) to WordPress/Impreza code, creating WPBakery shortcodes, building Impreza pages, implementing responsive layouts, customizing Impreza elements, or any WordPress development task using the Impreza theme with WPBakery. Essential for producing copy-paste ready code that works seamlessly with Impreza theme structure.
npx skill4agent add lavderenterprise/claude-skills impreza-wpbakery-dev| Task | Approach |
|---|---|
| Design → Code | Use shortcode syntax with Impreza elements |
| Responsive Layout | Use Design settings with device-specific controls |
| Custom Styling | Combine Design settings + Custom CSS classes |
| Dynamic Content | Use ACF integration + Grid Layouts |
| Performance | Enable "Disable extra features of WPBakery" option |
vc_row[vc_row]
[vc_column width="1/1"]
<!-- Content here -->
[/vc_column]
[/vc_row][vc_row el_class="separate-section" full_width="stretch_row"]
[vc_column]
<!-- Full-width content (Revolution Slider, Google Maps, etc.) -->
[/vc_column]
[/vc_row]gap0px10px20px30px40px60pxcolumns_typedefaultboxessmallheightdefaultautosmallmediumlargehugefullvaligntopmiddlebottomcontent_placementtopmiddlebottomcolor_schemedefaultalternateprimarysecondarycustombg_colorbg_imagebg_sizecovercontaininitialbg_repeatrepeatno-repeatrepeat-xrepeat-ybg_attachmentscrollfixedparallaxverticalhorizontalstillfixedparallax_speed0.12.01parallax_reverseyesno[vc_row
gap="30px"
height="large"
valign="middle"
color_scheme="alternate"
bg_image="https://example.com/bg.jpg"
bg_size="cover"
parallax="vertical"
parallax_speed="0.5"
css=".vc_custom_xxxxx{padding-top:80px;padding-bottom:80px;}"
]
[vc_column width="1/2"]
<!-- Left column -->
[/vc_column]
[vc_column width="1/2"]
<!-- Right column -->
[/vc_column]
[/vc_row]vc_column1/11/21/32/31/43/41/52/53/54/51/65/6widthoffsetvc_col-sm-offset-1vc_col-sm-offset-11alignleftcenterrightvaligntopmiddlebottombg_colortext_colorprimarysecondarycustom[vc_column width="1/3" width_md="1/2" width_sm="1/1"]
<!-- Desktop: 33.33%, Tablet: 50%, Mobile: 100% -->
[/vc_column]paddingmargin10px 20px 10px 20pxcalc(var(--base-padding) * 2)bg_colorbg_imagetext_colorborder_colorborder_radius0px100pxhide_on_desktopyesnohide_on_laptopyesnohide_on_tabletyesnohide_on_mobileyesnoel_classel_id<!-- Mobile-only padding override -->
[us_hwrapper
padding="40px"
padding_mobiles="20px"
]
<!-- Content -->
[/us_hwrapper]us_heading[us_heading
tag="h2"
title="Your Heading Text"
size="2rem"
align="center"
color="primary"
font_weight="700"
]tagh1h2h3h4h5h6pdivtitlesize1.5rem32pxclamp(1.5rem, 4vw, 3rem)alignleftcenterrightcolorprimarysecondarycustomfont_weight300400600700900transformnoneuppercaselowercasecapitalizeiconfas|starfar|heartus_text[us_text text="Your paragraph content here" size="1rem"]us_message[us_message
color="primary"
icon="fas|info-circle"
closing="1"
]
Important information for users.
[/us_message]colorsuccessattentionerrorinfous_btn[us_btn
text="Learn More"
link="url:https%3A%2F%2Fexample.com|title:Learn%20More|target:_blank"
style="raised"
color="primary"
size="medium"
icon="fas|arrow-right"
iconpos="right"
]textlinkurl:https%3A%2F%2Fexample.com|title:Title|target:_blankstyleraisedflatoutlinedcolorprimarysecondarylightdarkcustomsizesmallmediumlargeiconfas|arrow-rightfar|hearticonposleftrightalignleftcenterrightus_cta[us_cta
title="Ready to Get Started?"
message="Join thousands of satisfied customers today."
btn_label="Sign Up Now"
btn_link="url:https%3A%2F%2Fexample.com%2Fsignup"
btn_style="raised"
color_bg="primary"
]us_image[us_image
image="12345"
size="full"
align="center"
lightbox="1"
has_ratio="1"
ratio="16x9"
]imagesizethumbnailmediumlargefullalignleftcenterrightlightbox10ratio1x14x316x921x92x33x2has_ratio10us_gallery[us_gallery
ids="123,456,789"
columns="3"
gap="20px"
type="masonry"
lightbox="1"
]typedefaultmasonrycarouselsliderus_image_slider[us_image_slider
ids="123,456,789"
arrows="1"
nav="dots"
autoplay="1"
autoplay_period="5"
fullscreen="1"
ratio="16x9"
]vc_video[vc_video
link="https://www.youtube.com/watch?v=xxxxx"
el_aspect="16-9"
]us_accordion[us_accordion]
[us_accordion_item
title="First Section"
active="1"
]
Content of first section.
[/us_accordion_item]
[us_accordion_item title="Second Section"]
Content of second section.
[/us_accordion_item]
[/us_accordion]active10titleiconus_tabs[us_tabs
layout="default"
align="center"
]
[us_tab title="Tab 1" active="1"]
First tab content.
[/us_tab]
[us_tab title="Tab 2"]
Second tab content.
[/us_tab]
[/us_tabs]layoutdefaultmoderntrendytimelineus_popup[us_popup
show_on="click"
trigger_id="open-popup-btn"
]
Popup content goes here.
[/us_popup]show_onloadclickselectortrigger_idus_counter[us_counter
initial="0"
target="1500"
prefix="$"
suffix="+"
duration="2"
color="primary"
size="3rem"
]us_progbar[us_progbar
count="75"
title="WordPress Development"
style="thin"
color="primary"
]us_icon[us_icon
icon="fas|rocket"
size="3rem"
color="primary"
link="url:https%3A%2F%2Fexample.com"
]us_iconbox[us_iconbox
icon="fas|check-circle"
title="Feature Title"
style="default"
iconpos="top"
img="12345"
]
Feature description text goes here.
[/us_iconbox]styledefaultcircleoutlinediconpostopleftcolorprimarysecondarycustom[us_socials
items="%5B%7B%22type%22%3A%22facebook%22%2C%22url%22%3A%22https%3A%2F%2Ffacebook.com%2Fyourpage%22%7D%2C%7B%22type%22%3A%22twitter%22%2C%22url%22%3A%22https%3A%2F%2Ftwitter.com%2Fyouraccount%22%7D%5D"
style="colored"
size="1.5rem"
]us_cform[us_cform
receiver_email="info@example.com"
fields="%5B%7B%22type%22%3A%22text%22%2C%22label%22%3A%22Name%22%2C%22required%22%3A%221%22%7D%2C%7B%22type%22%3A%22email%22%2C%22label%22%3A%22Email%22%2C%22required%22%3A%221%22%7D%2C%7B%22type%22%3A%22textarea%22%2C%22label%22%3A%22Message%22%2C%22required%22%3A%221%22%7D%5D"
button_text="Send Message"
]textemailtextareaselectcheckboxradio[contact-form-7 id="1234"]us_gmaps[us_gmaps
address="1600 Amphitheatre Parkway, Mountain View, CA"
latitude="37.4220"
longitude="-122.0841"
zoom="15"
height="450px"
marker="1"
][us_testimonial
author="John Doe"
company="Acme Corp"
rating="5"
img="12345"
]
"Amazing product! Highly recommend to anyone looking for quality service."
[/us_testimonial]us_person[us_person
name="Jane Smith"
role="CEO & Founder"
image="12345"
email="jane@example.com"
phone="+1-555-0123"
socials="%5B%7B%22type%22%3A%22linkedin%22%2C%22url%22%3A%22https%3A%2F%2Flinkedin.com%2Fin%2Fjanesmith%22%7D%5D"
]
Short bio about the person.
[/us_person]us_separator[us_separator
type="default"
size="medium"
icon="fas|star"
]typedefaultfullwidthshortinvisiblesizesmallmediumlargehugeus_hwrapper[us_hwrapper
valign="middle"
wrap="1"
]
<!-- Inline elements with vertical centering -->
[/us_hwrapper]us_vwrapper[us_vwrapper]
<!-- Stacked elements -->
[/us_vwrapper]us_grid[us_grid
post_type="post"
items_qty="9"
columns="3"
items_gap="30px"
pagination="ajax"
filter="1"
filter_taxonomy="category"
]post_typepostpageproductportfolious_testimonialitems_qtycolumns123456items_gap0px60pxtypegridmasonrycarouselpaginationregularajaxload_moreinfinitefilter10filter_taxonomycategorypost_tagproduct_catorderbydatetitlerandmenu_ordermodifiedorderDESCASC[us_grid
post_type="post"
taxonomy_category="featured,news"
items_qty="6"
columns="3"
img_size="large"
title_size="1.5rem"
meta="date,author,comments"
excerpt_length="20"
][us_grid
post_type="product"
items_qty="12"
columns="4"
show_add_to_cart="1"
show_price="1"
filter="1"
filter_taxonomy="product_cat"
orderby="popularity"
][us_grid
post_type="post"
items_layout="12345"
items_qty="9"
columns="3"
]us_post_list[us_post_list
query_args="post_type=post&posts_per_page=5&category_name=news"
show_thumbnails="1"
show_date="1"
show_author="1"
]us_user_list[us_user_list
role="author"
items_qty="8"
columns="4"
show_avatar="1"
show_bio="1"
]us_single_product[us_single_product
product_id="123"
show_title="1"
show_price="1"
show_add_to_cart="1"
show_rating="1"
][us_grid
post_type="product"
type="carousel"
items_qty="8"
columns="4"
arrows="1"
dots="1"
autoplay="1"
][us_add_to_cart
product_id="123"
style="raised"
color="primary"
]us_page_block[us_page_block id="1234"][us_page_block
id="1234"
exclude_rows_columns="inside"
]noneinsidearound[us_html]
<div class="custom-component">
<!-- Your custom HTML -->
</div>
[/us_html][us_html]
<script>
// Your JavaScript code
jQuery(document).ready(function($) {
// Initialize custom functionality
});
</script>
[/us_html][us_text
text="{{post:acf_field_name}}"
][us_iconbox
title="Member Dashboard"
show_if="{{user:logged_in}}"
]
Exclusive content for members.
[/us_iconbox][us_image
image="12345"
hide_on_mobile="yes"
][vc_row]
[vc_column width="1/3" width_md="1/2" width_sm="1/1"]
<!-- Desktop: 33%, Tablet: 50%, Mobile: 100% -->
[/vc_column]
[vc_column width="1/3" width_md="1/2" width_sm="1/1"]
<!-- Responsive columns -->
[/vc_column]
[vc_column width="1/3" width_md="1/2" width_sm="1/1"]
<!-- Auto-stack on mobile -->
[/vc_column]
[/vc_row][us_hwrapper
padding="60px"
padding_tablets="40px"
padding_mobiles="20px"
]
<!-- Content with responsive spacing -->
[/us_hwrapper]<!-- Desktop-only image -->
[us_image
image="12345"
hide_on_tablet="yes"
hide_on_mobile="yes"
]
<!-- Mobile-only CTA -->
[us_btn
text="Call Now"
hide_on_desktop="yes"
hide_on_laptop="yes"
][us_heading
title="Responsive Heading"
size="clamp(1.5rem, 4vw, 3rem)"
]clamp(min, preferred, max)clamp(1.5rem, 4vw, 3rem)[us_image
image="12345"
has_ratio="1"
ratio="16x9"
ratio_tablets="4x3"
ratio_mobiles="1x1"
]Theme Options > Advanced Settings > Website Performance
☑ Disable extra features of WPBakery Page BuilderTheme Options > Advanced Settings > Website Performance
☑ Optimize CSS Output
☑ Optimize JavaScript Output
☑ Lazy Load Images
☑ Minify HTML OutputTheme Options > Advanced Settings > Icon Sets
☑ Load only used icons (automatic detection)Theme Options > Typography
- Set "Regular Text" to Arial (web-safe)
- Set headings to system fonts or minimal Google Fonts
- Or upload custom WOFF2 fonts locally<!-- In theme functions.php or child theme -->
<?php
add_action('wp_head', 'custom_critical_css', 1);
function custom_critical_css() {
echo '<style>
/* Critical above-the-fold CSS */
.header { /* styles */ }
.hero { /* styles */ }
</style>';
}
?><!-- Use Custom Code area in Impreza -->
<link rel="preload" href="styles.css" as="style" onload="this.onload=null;this.rel='stylesheet'">[vc_row
bg_image=""
el_class="lazy-bg"
css=".lazy-bg{background-image:none;}"
][vc_row gap="30px" height="medium"]
[vc_column width="1/2"]
<!-- Left content -->
[/vc_column]
[vc_column width="1/2"]
<!-- Right content -->
[/vc_column]
[/vc_row][us_heading][us_text][us_btn][us_image][us_icon][us_iconbox]color="primary"padding="40px"margin="20px"bg_color="#f5f5f5"el_class="custom-section"width_md="1/2"width_sm="1/1"padding_tablets="30px"padding_mobiles="20px"hide_on_mobile="yes"| Figma Element | Impreza Shortcode |
|---|---|
| Frame/Section | |
| Auto Layout | |
| Text heading | |
| Text body | |
| Button | |
| Image | |
| Icon | |
| Card | |
[vc_row
bg_color="#FFFFFF"
padding="80px 0"
padding_tablets="60px 0"
padding_mobiles="40px 0"
]
[vc_column width="1/1"]
[us_heading
tag="h2"
title="Features That Matter"
size="2.5rem"
size_tablets="2rem"
size_mobiles="1.75rem"
align="center"
color="#1A1A1A"
font_weight="700"
]
[us_text
text="Discover powerful tools designed for success"
size="1.125rem"
align="center"
color="#666666"
]
[/vc_column]
[/vc_row]
[vc_row
gap="30px"
padding="0 0 80px 0"
]
[vc_column width="1/3" width_md="1/2" width_sm="1/1"]
[us_iconbox
icon="fas|zap"
title="Lightning Fast"
style="circle"
iconpos="top"
color="primary"
]
Optimized for speed and performance from day one.
[/us_iconbox]
[/vc_column]
<!-- Repeat for other features -->
[/vc_row][vc_row
height="large"
valign="middle"
bg_image="https://example.com/hero-bg.jpg"
bg_size="cover"
bg_attachment="fixed"
color_scheme="dark"
parallax="vertical"
parallax_speed="0.3"
]
[vc_column width="1/1" align="center"]
[us_heading
tag="h1"
title="Transform Your Business Today"
size="3.5rem"
size_tablets="2.5rem"
size_mobiles="2rem"
color="#FFFFFF"
font_weight="700"
]
[us_text
text="Join thousands of companies already succeeding with our platform"
size="1.25rem"
color="#FFFFFF"
margin="0 0 30px 0"
]
[us_hwrapper
valign="middle"
wrap="1"
]
[us_btn
text="Get Started Free"
style="raised"
color="primary"
size="large"
el_class="hero-btn"
]
[us_btn
text="Watch Demo"
style="outlined"
color="light"
size="large"
icon="fas|play"
el_class="hero-btn"
margin="0 0 0 20px"
]
[/us_hwrapper]
[/vc_column]
[/vc_row][vc_row
height="full"
valign="middle"
bg_image="URL_HERE"
bg_size="cover"
color_scheme="dark"
]
[vc_column width="1/1" align="center"]
[us_heading
tag="h1"
title="Your Main Headline"
size="clamp(2rem, 5vw, 4rem)"
color="#FFFFFF"
]
[us_text
text="Compelling subheadline goes here"
size="1.25rem"
color="#FFFFFF"
]
[us_btn
text="Call to Action"
style="raised"
color="primary"
size="large"
]
[/vc_column]
[/vc_row][vc_row gap="30px"]
[vc_column width="1/3" width_md="1/2" width_sm="1/1"]
[us_iconbox
icon="fas|rocket"
title="Fast Performance"
iconpos="top"
]
Lightning-fast load times guaranteed.
[/us_iconbox]
[/vc_column]
[vc_column width="1/3" width_md="1/2" width_sm="1/1"]
[us_iconbox
icon="fas|shield-alt"
title="Secure Platform"
iconpos="top"
]
Enterprise-grade security measures.
[/us_iconbox]
[/vc_column]
[vc_column width="1/3" width_md="1/2" width_sm="1/1"]
[us_iconbox
icon="fas|headset"
title="24/7 Support"
iconpos="top"
]
Always here when you need us.
[/us_iconbox]
[/vc_column]
[/vc_row][vc_row
bg_color="#F8F9FA"
padding="80px 0"
]
[vc_column width="1/1"]
[us_heading
title="What Our Clients Say"
align="center"
size="2.5rem"
]
[/vc_column]
[/vc_row]
[vc_row
gap="30px"
bg_color="#F8F9FA"
padding="0 0 80px 0"
]
[vc_column width="1/3" width_md="1/1"]
[us_testimonial
author="John Doe"
company="Acme Corp"
rating="5"
]
"Excellent service and outstanding results!"
[/us_testimonial]
[/vc_column]
<!-- Repeat for more testimonials -->
[/vc_row][vc_row gap="30px"]
[vc_column width="1/3" width_md="1/1"]
[us_pricing_table
title="Starter"
price="$29"
period="/month"
features="10 Users|50GB Storage|Email Support"
button_text="Get Started"
button_link="url:signup"
]
[/vc_column]
[vc_column width="1/3" width_md="1/1"]
[us_pricing_table
title="Professional"
price="$79"
period="/month"
featured="1"
features="50 Users|500GB Storage|Priority Support|Advanced Analytics"
button_text="Start Free Trial"
button_link="url:trial"
]
[/vc_column]
[vc_column width="1/3" width_md="1/1"]
[us_pricing_table
title="Enterprise"
price="$199"
period="/month"
features="Unlimited Users|Unlimited Storage|24/7 Support|Custom Integration"
button_text="Contact Sales"
button_link="url:contact"
]
[/vc_column]
[/vc_row][vc_row gap="60px" valign="middle"]
[vc_column width="1/2" width_md="1/1"]
[us_image
image="IMAGE_ID"
size="full"
ratio="16x9"
has_ratio="1"
]
[/vc_column]
[vc_column width="1/2" width_md="1/1"]
[us_heading
tag="h2"
title="Why Choose Us"
size="2.5rem"
]
[us_text
text="We provide innovative solutions that drive real results for your business."
]
[us_btn
text="Learn More"
style="raised"
color="primary"
]
[/vc_column]
[/vc_row][us_grid
post_type="post"
items_qty="9"
columns="3"
columns_tablets="2"
columns_mobiles="1"
items_gap="30px"
img_size="large"
title_size="1.5rem"
excerpt_length="20"
meta="date,author,comments"
pagination="load_more"
filter="1"
filter_taxonomy="category"
][vc_row
gap="60px"
padding="80px 0"
]
[vc_column width="1/2" width_md="1/1"]
[us_heading
title="Get in Touch"
size="2.5rem"
]
[us_text
text="Have questions? We'd love to hear from you."
]
[us_iconbox
icon="fas|phone"
title="+1 (555) 123-4567"
iconpos="left"
]
[/us_iconbox]
[us_iconbox
icon="fas|envelope"
title="info@example.com"
iconpos="left"
]
[/us_iconbox]
[/vc_column]
[vc_column width="1/2" width_md="1/1"]
[us_cform
receiver_email="info@example.com"
button_text="Send Message"
]
[/vc_column]
[/vc_row]// Process shortcodes in custom areas
echo do_shortcode('[your_shortcode]');[vc_column width="1/3" width_md="1/2" width_sm="1/1"][vc_row
bg_image="https://full-url-here.jpg"
bg_size="cover"
height="medium" <!-- Add explicit height -->
]bg_attachment="scroll"[vc_row
parallax="vertical"
parallax_speed="0.5"
bg_attachment="" <!-- Leave empty for parallax -->
]☑ Font Awesome 5 Pro (included with Impreza)/* Use !important sparingly */
.custom-class {
color: #FF0000 !important;
}
/* Or increase specificity */
.vc_row .custom-class {
color: #FF0000;
}/* Custom button hover effect */
.us-btn-container .us-btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
transition: all 0.3s ease;
}
/* Custom heading underline */
.us-heading .us-heading-title::after {
content: '';
display: block;
width: 60px;
height: 3px;
background: var(--color-primary);
margin: 20px auto 0;
}
/* Responsive utilities */
@media (max-width: 767px) {
.hide-mobile {
display: none !important;
}
}el_class[us_heading
title="Custom Styled Heading"
el_class="custom-heading-style"
].custom-heading-style {
background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}:root {
--color-primary: #1E88E5;
--color-secondary: #FF6F00;
--font-heading: 'Poppins', sans-serif;
--font-body: 'Open Sans', sans-serif;
--base-padding: 20px;
}
/* Use in elements */
.custom-section {
padding: calc(var(--base-padding) * 2);
color: var(--color-primary);
font-family: var(--font-heading);
}/* Fade in on scroll */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.fade-in-up {
animation: fadeInUp 0.6s ease-out;
}
/* Pulse effect */
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
.pulse-effect {
animation: pulse 2s infinite;
}<script>
jQuery(document).ready(function($) {
// Smooth scroll to anchor
$('a[href^="#"]').on('click', function(e) {
e.preventDefault();
var target = $(this.getAttribute('href'));
if(target.length) {
$('html, body').stop().animate({
scrollTop: target.offset().top - 100
}, 1000);
}
});
// Number counter animation
$('.us_counter').each(function() {
var $this = $(this);
var countTo = $this.attr('data-count');
$({ countNum: 0 }).animate({
countNum: countTo
}, {
duration: 2000,
easing: 'swing',
step: function() {
$this.text(Math.floor(this.countNum));
},
complete: function() {
$this.text(this.countNum);
}
});
});
// Parallax mouse effect
$('.parallax-mouse').on('mousemove', function(e) {
var x = (e.pageX / $(window).width()) - 0.5;
var y = (e.pageY / $(window).height()) - 0.5;
$(this).find('.parallax-layer').css({
'transform': 'translate(' + (x * 30) + 'px, ' + (y * 30) + 'px)'
});
});
});
</script><script>
// Fade in elements on scroll
const observerOptions = {
threshold: 0.1,
rootMargin: '0px 0px -100px 0px'
};
const observer = new IntersectionObserver(function(entries) {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
observer.unobserve(entry.target);
}
});
}, observerOptions);
document.querySelectorAll('.animate-on-scroll').forEach(el => {
observer.observe(el);
});
</script>
<style>
.animate-on-scroll {
opacity: 0;
transform: translateY(30px);
transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
opacity: 1;
transform: translateY(0);
}
</style>/*
Theme Name: Impreza Child
Template: Impreza
Version: 1.0.0
*/<?php
add_action('wp_enqueue_scripts', 'impreza_child_enqueue_styles');
function impreza_child_enqueue_styles() {
wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
wp_enqueue_style('child-style',
get_stylesheet_directory_uri() . '/style.css',
array('parent-style'),
wp_get_theme()->get('Version')
);
}
// Custom shortcodes
add_shortcode('custom_element', 'custom_element_function');
function custom_element_function($atts) {
$atts = shortcode_atts(array(
'title' => 'Default Title',
'color' => '#000000'
), $atts);
return '<div class="custom-element" style="color:' . esc_attr($atts['color']) . '">'
. esc_html($atts['title'])
. '</div>';
}
?>// Sanitize text input
$clean_text = sanitize_text_field($_POST['input']);
// Sanitize URL
$clean_url = esc_url($_POST['url']);
// Sanitize email
$clean_email = sanitize_email($_POST['email']);
// Escape output
echo esc_html($user_content);
echo esc_attr($attribute_value);
echo esc_url($url);// Add nonce to form
wp_nonce_field('custom_form_action', 'custom_form_nonce');
// Verify nonce
if (!wp_verify_nonce($_POST['custom_form_nonce'], 'custom_form_action')) {
wp_die('Security check failed');
}global $wpdb;
// WRONG
$results = $wpdb->get_results("SELECT * FROM table WHERE id = " . $_GET['id']);
// RIGHT
$results = $wpdb->get_results($wpdb->prepare(
"SELECT * FROM table WHERE id = %d",
$_GET['id']
));[us_btn
text="Submit"
aria_label="Submit contact form"
]
[us_icon
icon="fas|search"
aria_label="Search icon"
].us-btn:focus,
.us-iconbox:focus {
outline: 2px solid var(--color-primary);
outline-offset: 2px;
}/* Good contrast */
.text-primary {
color: #1E88E5; /* on white background */
}
/* Check contrast ratios at: */
/* https://webaim.org/resources/contrastchecker/ */[us_image
image="12345"
alt="Descriptive alt text for screen readers"
][us_heading tag="h1" title="Main Page Title"]
[us_heading tag="h2" title="Section Title"]
[us_heading tag="h3" title="Subsection Title"][us_html]
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Your Business Name",
"image": "https://example.com/logo.jpg",
"@id": "https://example.com",
"url": "https://example.com",
"telephone": "+1-555-0123",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 Main St",
"addressLocality": "City",
"addressRegion": "State",
"postalCode": "12345",
"addressCountry": "US"
}
}
</script>
[/us_html]vc_row[vc_column el_class="sticky-sidebar"]
<!-- Sidebar content -->
[/vc_column]@media (min-width: 1024px) {
.sticky-sidebar {
position: sticky;
top: 100px;
}
}body {
cursor: url('cursor.png'), auto;
}
a:hover {
cursor: url('pointer.png'), pointer;
}<script>
window.addEventListener('scroll', function() {
var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
var scrolled = (winScroll / height) * 100;
document.querySelector('.progress-bar').style.width = scrolled + "%";
});
</script>
<style>
.progress-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 3px;
background: #f1f1f1;
z-index: 9999;
}
.progress-bar {
height: 3px;
background: var(--color-primary);
width: 0%;
}
</style>[vc_row
el_class="lazy-bg"
data-bg="https://example.com/image.jpg"
]document.addEventListener('DOMContentLoaded', function() {
var lazyBgs = document.querySelectorAll('.lazy-bg');
var observer = new IntersectionObserver(function(entries) {
entries.forEach(function(entry) {
if (entry.isIntersecting) {
var bg = entry.target.dataset.bg;
entry.target.style.backgroundImage = 'url(' + bg + ')';
observer.unobserve(entry.target);
}
});
});
lazyBgs.forEach(function(bg) {
observer.observe(bg);
});
});