Halloween Sale 15% off Ends in See the plans
PHP

Kadence: Call-to-Action Band Above the Footer

Adds a full-width call-to-action band above the footer on every page of the Kadence theme, with a heading and button you set at the top.

Don’t have WPIDE yet? Install it on your site

Code

// CTA content and pages to skip.
$wpide_kadence_cta      = array( 'heading' => 'Ready to start your project?', 'button' => 'Get a quote', 'url' => '/contact/' );
$wpide_kadence_cta_skip = array();

add_action( 'kadence_before_footer', function () use ( $wpide_kadence_cta, $wpide_kadence_cta_skip ) {
    if ( $wpide_kadence_cta_skip && is_page( $wpide_kadence_cta_skip ) ) {
        return;
    }

    printf(
        '<section class="wpide-kadence-cta" style="padding:48px 20px;text-align:center;background:var(--global-palette1,#2b6cb0);color:#fff;"><h2 style="color:inherit;margin:0 0 16px;">%1$s</h2><a class="button" href="%2$s" style="background:#fff;color:#111;">%3$s</a></section>',
        esc_html( $wpide_kadence_cta['heading'] ),
        esc_url( $wpide_kadence_cta['url'] ),
        esc_html( $wpide_kadence_cta['button'] )
    );
} );

Notes

Add page IDs to $wpide_kadence_cta_skip to hide the band on those pages (for example the contact page).

How to add this snippet

  1. Install WPIDE on your WordPress site (it is free) and open Code Snippets.
  2. Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
  3. It is added inactive: review the code and settings, then switch it on.

Have a snippet worth sharing?

Publish it to the library from WPIDE or right here. Sign in with any WordPress site that runs WPIDE, free or Pro. Public snippets are reviewed by the WPIDE team before they appear.

Which site should get this snippet?

Enter the address of your WordPress site. WPIDE opens there in a new tab with the snippet ready to review and save.

Remembered in this browser only, so you are asked once.

Report this snippet

Tell the WPIDE team what is wrong: broken code, something harmful, spam or copied work.