Skip to content

Instantly share code, notes, and snippets.

@studiopress
studiopress / nav-extras.php
Last active September 11, 2023 21:24
Modify the nav extras.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
add_filter( 'wp_nav_menu_items', 'theme_menu_extras', 10, 2 );
/**
* Filter menu items, appending either a search form or today's date.
*
* @param string $menu HTML string of list items.
* @param stdClass $args Menu arguments.
*
@studiopress
studiopress / columns.css
Last active August 10, 2023 13:50
Genesis column classes.
/* Column Classes
Link: http://twitter.github.io/bootstrap/assets/css/bootstrap-responsive.css
--------------------------------------------- */
.five-sixths,
.four-sixths,
.one-fourth,
.one-half,
.one-sixth,
.one-third,
@studiopress
studiopress / style.css
Last active June 28, 2023 16:17
CSS to style Instagram feed.
/* Instagram
---------------------------------------------------------------------------------------------------- */
.instagram {
overflow: hidden;
}
.instagram .wrap {
border-top: 1px solid #eee;
margin-left: auto;
@studiopress
studiopress / credits-1.php
Last active April 26, 2023 15:09
Genesis footer.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Customize the credits
add_filter( 'genesis_footer_creds_text', 'sp_footer_creds_text' );
function sp_footer_creds_text() {
echo '<div class="creds"><p>';
echo 'Copyright &copy; ';
echo date('Y');
echo ' &middot; <a href="http://mydomain.com">My Custom Link</a> &middot; Built on the <a href="http://www.studiopress.com/themes/genesis" title="Genesis Framework">Genesis Framework</a>';
@studiopress
studiopress / style.css
Created August 30, 2017 19:34
Sample CSS using Proxima Nova from Google Fonts.
body {
background-color: #fff;
color: #000;
font-family: 'proxima-nova', sans-serif;
font-size: 18px;
font-size: 1.8rem;
font-weight: 300;
line-height: 1.875;
margin: 0;
}
@studiopress
studiopress / page_blog.php
Last active August 7, 2021 00:59
Genesis page content on blog template.
<?php
//* Template Name: Blog
//* Show page content above posts
add_action( 'genesis_loop', 'genesis_standard_loop', 5 );
genesis();
@studiopress
studiopress / call-to-action-banner.html
Last active July 22, 2021 22:16
Executive Pro Gists
<div class="three-fourths first">Here's a great place to write something specific that you want your visitors to read.</div>
<div class="one-fourth"><a class="button alignright" href="#">Contact Us Today</a></div>
@studiopress
studiopress / force-layout-settings.php
Last active June 24, 2021 21:01
Genesis admin management.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Force content-sidebar layout setting
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' );
//* Force sidebar-content layout setting
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_sidebar_content' );
//* Force content-sidebar-sidebar layout setting
@studiopress
studiopress / color-button.css
Last active January 31, 2021 13:48
Colored Content Boxes
/* Color Buttons
------------------------------------------------------------ */
.button-blue,
.button-gray,
.button-green,
.button-purple,
.button-red,
.button-yellow {
color: #fff;
@studiopress
studiopress / home-link.php
Last active December 14, 2020 16:48
Genesis breadcrumbs.