Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Register single-optin widget area
- genesis_register_widget_area(
- array(
- 'id' => 'single-optin',
- 'name' => __( 'Single Optin', 'my-theme-text-domain' ),
- 'description' => __( 'For email option subscription widget', 'my-theme-text-domain' ),
- )
- );
- // Display single-optin widget area on single blog posts other than those categorized under "category-2"
- add_action( 'genesis_after_header', 'sk_single_optin' );
- function sk_single_optin() {
- if ( !is_singular( 'post' ) ) {
- return;
- }
- if ( !in_category( 'category-2' ) ) {
- return;
- }
- genesis_widget_area( 'single-optin', array(
- 'before' => '<div class="single-optin widget-area"><div class="wrap">',
- 'after' => '</div></div>',
- ) );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement