Skip to content

Instantly share code, notes, and snippets.

@studiopress
studiopress / sample.html
Last active Nov 9, 2017
Add HTML for custom entry message boxes.
View sample.html
<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 Nov 9, 2017
Add custom entry message styles.
View style.css
/* Entry Messages
--------------------------------------------- */
.message {
padding: 25px 30px;
}
.message,
.message a {
color: #fff;
@studiopress
studiopress / category-daily.php
Last active Apr 9, 2019
Create custom category template file.
View category-daily.php
<?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 Nov 2, 2017
Register widget area for newsletter section.
View functions.php
<?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 Oct 12, 2017
Sample HTML to customize site footer with the Genesis Framework.
View sample.html
<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 Mar 13, 2018
Customize site footer with the Genesis Framework.
View functions.php
<?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 Sep 28, 2017
CSS used for newsletter widget area.
View sample.css
/* 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 Nov 6, 2017
Hook Newsletter widget area before footer.
View functions.php
<?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 Sep 28, 2017
Register widget area for newsletter section.
View functions.php
<?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 Sep 21, 2017
CSS used for Photo Grid section of homepage.
View sample.css
.attendee {
display: block;
float: left;
height: 25%;
padding: 20px;
position: relative;
width: 25%;
}
.attendee-name {
You can’t perform that action at this time.