Skip to content

Instantly share code, notes, and snippets.

@studiopress
studiopress / sample.html
Last active November 9, 2017 14:45
Add HTML for custom entry message boxes.
<p class="message green">This is an example of custom message, which is easy to implement and can be used to put emphasis on a particular thought or sentiment. <a href="#">Click here for more</a>.</p>
<p class="message orange">This is an example of custom message, which is easy to implement and can be used to put emphasis on a particular thought or sentiment. <a href="#">Click here for more</a>.</p>
<p class="message red">This is an example of custom message, which is easy to implement and can be used to put emphasis on a particular thought or sentiment. <a href="#">Click here for more</a>.</p>
@studiopress
studiopress / style.css
Last active November 9, 2017 14:45
Add custom entry message styles.
/* Entry Messages
--------------------------------------------- */
.message {
padding: 25px 30px;
}
.message,
.message a {
color: #fff;
@studiopress
studiopress / category-daily.php
Last active April 9, 2019 16:39
Create custom category template file.
<?php
// Add newsletter signup box after 6th entry.
add_action( 'genesis_after_entry', 'theme_newsletter_widget_area' );
function theme_newsletter_widget_area() {
global $wp_query;
$counter = $wp_query->current_post;
@studiopress
studiopress / functions.php
Created November 2, 2017 17:51
Register widget area for newsletter section.
<?php
// Do NOT include the opening php tag.
// Register Newsletter widget area.
genesis_register_sidebar( array(
'id' => 'newsletter',
'name' => __( 'Newsletter', 'theme-name' ),
'description' => __( 'This is the newsletter widget area.', 'theme-name' ),
) );
@studiopress
studiopress / sample.html
Created October 12, 2017 11:56
Sample HTML to customize site footer with the Genesis Framework.
<p>Handcrafted with <span class="dashicons dashicons-heart"></span> by moi. Powered by the <a href="https://www.studiopress.com/">Genesis Framework</a>. <a href="http://briangardner.com/contact/">Get in Touch</a>.</p>
@studiopress
studiopress / functions.php
Last active March 13, 2018 09:53
Customize site footer with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Remove site footer.
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );
// Customize site footer
add_action( 'genesis_footer', 'sp_custom_footer' );
@studiopress
studiopress / sample.css
Created September 28, 2017 15:29
CSS used for newsletter widget area.
/* Newsletter
---------------------------------------------------------------------------------------------------- */
.newsletter .arrow-down {
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 20px solid #fff;
height: 0;
margin-left: auto;
margin-right: auto;
@studiopress
studiopress / functions.php
Last active November 6, 2017 23:12
Hook Newsletter widget area before footer.
<?php
// Do NOT include the opening php tag.
// Add newsletter widget area before footer.
add_action( 'genesis_before_footer', 'sp_newsletter_widget' );
function sp_newsletter_widget() {
genesis_widget_area( 'newsletter', array(
'before' => '<div class="newsletter"><div class="arrow-down"></div><div class="wrap">',
'after' => '</div></div></div>',
@studiopress
studiopress / functions.php
Created September 28, 2017 15:15
Register widget area for newsletter section.
<?php
// Do NOT include the opening php tag.
// Register Newsletter widget area.
genesis_register_sidebar( array(
'id' => 'newsletter',
'name' => __( 'Newsletter', 'theme-name' ),
'description' => __( 'This is the newsletter widget area.', 'theme-name' ),
) );
@studiopress
studiopress / sample.css
Created September 21, 2017 13:46
CSS used for Photo Grid section of homepage.
.attendee {
display: block;
float: left;
height: 25%;
padding: 20px;
position: relative;
width: 25%;
}
.attendee-name {