/* Santoshi Interiors Hero Shortcode
Add this to your theme's functions.php or a small plugin.
Use shortcode: [santoshi_hero]
*/
function santoshi_enqueue_hero_styles() {
// Only enqueue if not in admin
if ( ! is_admin() ) {
wp_register_style( 'santoshi-hero', false );
wp_enqueue_style( 'santoshi-hero' );
// Inline CSS will be added in the shortcode output below to keep one-file usage simple.
}
}
add_action( 'wp_enqueue_scripts', 'santoshi_enqueue_hero_styles' );
function santoshi_hero_shortcode( $atts ) {
$atts = shortcode_atts( array(
'title' => 'Your Choice. Your Selection. Your Lifestyle. — We Are Santoshi Interiors.',
'subtitle' => 'Designing Spaces, Defining Lifestyles.',
'cta_text' => 'Get a Free Quote',
'cta_url' => '/contact',
'logo_url' => '', // set a URL or leave blank to hide logo
'photo_url' => '', // optional right-side image
), $atts, 'santoshi_hero' );
// Inline CSS (paste into style.css if you prefer)
$css = "
.santoshi-hero{display:flex;align-items:center;justify-content:space-between;gap:30px;padding:56px 24px;background:linear-gradient(180deg,#fff 0%,#f7f7f9 100%);border-radius:16px;box-shadow:0 6px 30px rgba(20,20,30,0.04);max-width:1200px;margin:24px auto;}
.santoshi-hero .left{flex:1;min-width:0}
.santoshi-hero .brand{display:flex;align-items:center;gap:16px;margin-bottom:8px}
.santoshi-hero .brand img{height:56px;width:auto;border-radius:6px;object-fit:contain}
.santoshi-hero h1{font-size:clamp(20px,4.4vw,36px);margin:0 0 12px 0;line-height:1.05;font-weight:700;color:#111}
.santoshi-hero p{margin:0 0 18px 0;color:#444;font-size:clamp(14px,1.8vw,18px)}
.santoshi-hero .cta{display:inline-flex;align-items:center;gap:12px;padding:12px 18px;border-radius:12px;background:#111;color:#fff;text-decoration:none;font-weight:600;box-shadow:0 6px 18px rgba(17,17,17,0.08)}
.santoshi-hero .small-list{margin-top:16px;color:#555;font-size:14px}
.santoshi-hero .right{width:360px;max-width:40%;display:flex;align-items:center;justify-content:center}
.santoshi-hero .right img{width:100%;height:auto;border-radius:12px;object-fit:cover}
@media(max-width:900px){ .santoshi-hero{flex-direction:column;text-align:center}.santoshi-hero .right{max-width:85%} }
";
// build HTML
$logo_html = $atts['logo_url'] ? '
' : '';
$photo_html = $atts['photo_url'] ? '
' : '';
$html = "";
$html .= '';
$html .= ' ';
return $html;
}
add_shortcode( 'santoshi_hero', 'santoshi_hero_shortcode' );
';
if ( $logo_html ) {
$html .= '';
}
$html .= '
'; // left
$html .= '' . $logo_html . '
';
} else {
$html .= 'Santoshi Interiors
Santoshi Interiors
' . wp_kses_post( $atts['title'] ) . '
'; if ( ! empty( $atts['subtitle'] ) ) { $html .= '' . esc_html( $atts['subtitle'] ) . '
'; } $html .= '' . esc_html( $atts['cta_text'] ) . ''; // optional short bullets — change as needed $html .= 'Services: Modular Kitchens • Custom Designs • 7-Year Warranty
';
$html .= '';
$html .= $photo_html ? $photo_html : '';
$html .= '
'; // right
$html .= '