Elementor Shrinking Header Snippet

/* shrinking header section */ .shrinker { background: transparent; height: (set your header height in pixels); transition: all .2s linear!important; -webkit-transition: all .2s linear!important; -moz-transition: all .2s linear!important; } .shrinker.elementor-sticky–effects { background: #fff; height: (set your header height after shrinking…Continue reading

Site Name, URL, Link, Logo

// Site name add_shortcode(‘site_name’, function () { return get_bloginfo(‘name’); }); // Home URL (front-end URL) add_shortcode(‘site_url’, function () { return esc_url(home_url(‘/’)); }); // Clickable site link: [site_link text=”My Site”] add_shortcode(‘site_link’, function ($atts) { $a = shortcode_atts([‘text’ => get_bloginfo(‘name’)], $atts); return…Continue reading

ACF Display Frontend (Opt Fields)

// Shortcode function to display ACF field from options function display_acf_option_shortcode($atts) { // Parse attributes with defaults $atts = shortcode_atts(array( ‘field’ => ”, // Default field (leave empty or set fallback) ), $atts); // Check if field is provided if…Continue reading

Number of Woo Products per page

/** * Change number of products that are displayed per page (shop page) */ add_filter( ‘loop_shop_per_page’, ‘new_loop_shop_per_page’, 20 ); function new_loop_shop_per_page( $cols ) { // $cols contains the current number of products per page based on the value stored on…Continue reading

Jetpack Instant Search Wholesale Visibility

/** * Main plugin class. * * Security / Maintainability / Accessibility notes: * – No user-supplied input is processed; configuration is fixed server-side. * – We scope changes to Jetpack Instant Search via its documented filter, so normal queries,…Continue reading

[Advision Publisher] Short Codes

// === SCHEMA: define every shortcode, its params, and internal template === $shortcode_schemas = [ ‘faqs’ => [ ‘description’ => ‘Expandable FAQ section.’, ‘parameters’ => [], ‘_internal’ => [ ‘template_id’ => 3676 ], // INTERNAL ONLY ], // [faq faqs='[{“question”:”…”,”answer”:”…”}]’]…Continue reading