• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Dominate Marketing

Why Dabble When You Can DOMINATE

  • Blog
  • Contact

Add refined CTA & Announcement widget areas etc

February 13, 2018 by Dominate Marketing

CTA & Announcement widget areas – CSS

STYLE.CSS


/* Site Wide CTA
------------------------------------------------------ */

.site-wide-cta {
    background: #fff url(images/border.png) top center repeat-x;
    background-size: 1200px 1px;
    border: none;
    margin: 0 auto;
    padding: 30px;
}

.site-wide-cta .enews-widget {
    color: #333;
}

.site-wide-cta .enews-widget p {
    background: transparent;
    border-right: 1px solid #ae9d78;
    float: left;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 0;
    margin-top: 8px;
    padding: 20px;
    text-align: center;
    text-transform: uppercase;
    width: 30%;
}

.site-wide-cta form {
    float: right;
    margin: 0 auto;
    padding: 20px 30px;
    width: 70%;
}

.site-wide-cta .enews-widget input {
    float: left;
    margin-bottom: 0;
    margin-right: 10px;
    padding: 12px;
    width: 27%;
}

.site-wide-cta .enews-widget input[type="submit"] {
    background: #ae9d78;
    border-color: #ae9d78;
    color: #fff;
    margin-right: 0;
    padding: 12px 34px;
    width: auto;
}

.site-wide-cta .enews-widget input[type="submit"]:hover {
    background: transparent;
    border-color: #333;
    color: #333;
}

@media only screen and (max-width: 1200px) {
    
    .announcement-widget .enews-widget p,
    .site-wide-cta .enews-widget p {
        border-right: none;
        float: none;
        width: 100%;
    }

    .announcement-widget .enews-widget input,
    .site-wide-cta .enews-widget input {
        width: 27%;
    }
    .announcement-widget form,
    .site-wide-cta form {
        float: none;
        width: 100%;
    }

}
@media only screen and (max-width: 960px) {
        .site-wide-cta {
        width: 100%;
    }

}

@media only screen and (max-width: 800px) {

    .announcement-widget .enews-widget input,
    .announcement-widget .enews-widget input[type="submit"],
    .site-wide-cta .enews-widget input,
    .site-wide-cta .enews-widget input[type="submit"] {
        float: left;
        margin: 5px 0;
        padding: 5px;
        width: 50%;
    }

    .announcement-widget {
        padding: 0;
    }

}

functions.php

//    FUNCTIONS.PHP
    
add_action( 'genesis_before', 'refined_announcement_widget', 8 );
/**
 * Hooks Announcement Widget.
 *
 * @since 1.0.0
 */
function refined_announcement_widget() {

    genesis_widget_area( 'announcement-widget', array(
        'before' => '<div class="announcement-widget widget-area"><div class="wrap">',
        'after'  => '</div></div>',
    ));

}

add_action( 'genesis_before_footer', 'refined_site_wide_cta', 8 );
/**
 * Hooks Site Wide CTA widget after the content.
 *
 * @since 1.0.0
 */
function refined_site_wide_cta() {

    if ( ! is_home() ) {

        genesis_widget_area( 'site-wide-cta', array(
            'before' => '<div class="site-wide-cta widget-area"><div class="wrap">',
            'after'  => '</div></div>',
        ));

    }

}

lib > widgets.php

// THEME FILE > lib > widgets.php
<?php

/**
 * This file adds all the widget spaces to the Refined theme.
 *
 * @package      Showcase
 */

// Announcement widget area in navigation.
genesis_register_sidebar( array(
    'id'              => 'announcement-widget',
    'name'            => __( 'Announcements', 'showcase' ),
    'description'     => __( 'This is the section at the very top of your site for special announcements.', 'showcase' ),
));


// Site Wide CTA widget area.
genesis_register_sidebar( array(
    'id'            => 'site-wide-cta',
    'name'          => __( 'Site Wide CTA', 'showcase' ),
    'description'   => __( 'This widget space appears between the 2nd and 3rd home page widget spaces, as well as at the bottom of all other pages.', 'showcase' ),
));

Filed Under: Genesis

Categories

  • css tricks
  • Errors
  • Fixes & F**ups
  • Formidable Forms
  • Genesis
  • Google Apps Mail
  • How To's & Tips n Tricks
  • MailChimp
  • Media
  • Plugins
  • Scam Alert
  • Shipping
  • Shopping Cart Modules
  • Videos
  • Widgets
  • Woocommerce

Recent Posts

  • font gradient
  • Horizontal Genesis eNews E-Mail Opt In Subscribe Box Inline
  • Hide shipping rates when free shipping is available
  • How to Create a WooCommerce Wholesale System
  • Imagify vs EWWW vs Kraken vs WP Smush vs ShortPixel: The 5 Best WordPress Image Optimization Plugins Compared
  • Formidable Forms & Mod Security
  • Genesis Slide-in Widget
  • Genesis Plugins
  • Genesis overlay widget
  • Add refined CTA & Announcement widget areas etc
  • Migrate Weebly to WordPress: A Step-by-Step Guide
  • Sparkle
  • Remove WordPress Default Widgets
  • Some great css tricks on this website
  • Border Around A Button
  • Adding support for the new WooCommerce 3.0 gallery features
  • 100 WooCommerce Tips and Tricks
  • Woocommerce – Change number of products displayed
  • Genesis Footer Widgets
  • 3 Ways to integrate WooCommerce with Genesis
  • Emails fail on multisite setup
  • Video Embed & Thumbnail Generator
  • WP MS User Roles
  • Setup Gmail for Domain – Google Apps Mail
  • Remove default WordPress widgets
  • Re-Order Single Product Template
  • Change SKU Text
  • Don’t Get Caught by an Invitation To Register Domain – Fake Domain Renewal Letters Can Cost You
  • WooCommerce MailChimp Integration
  • Hide the shipping methods if the cart does not have the specific shipping class

Handcrafted with by Dominate Marketing
Web Design & Development, SEO & Ultra Nerdyness!
Sitemap | Terms of Service | Privacy Policy | Delivery Policy | Refund Policy | Owner Login