Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

<?php //remove this line
add_filter( 'genesis_term_intro_text_output', 'cd_do_archive_term_description' );
/**
* Show archive description only on first page of a taxonomy archive.
*
* @return string
*/
function cd_do_archive_term_description( $intro_text ) {
if ( is_paged() ) {
@cdils
cdils / bbpress.scss
Last active January 21, 2019 21:21
This is quick, sassified version of the default bbPress stylesheet. I did not sassify the media queries at this point (I intend to re-work those as mobile-first for my project). Also note that I kept the original stylesheet organization. There's repition of some selectors that could be avoidded if the current organization was disregarded. :) As …
/**
* bbPress specific CSS
*
* @package bbPress
* @subpackage Theme
*/
/* =bbPress Style
-------------------------------------------------------------- */
@cdils
cdils / bbpress.scss
Created May 18, 2016 18:33
This is quick, sassified version of the default bbPress stylesheet. I did not sassify the media queries at this point (I intend to re-work those as mobile-first for my project).
/**
* bbPress specific CSS
*
* @package bbPress
* @subpackage Theme
*/
/* =bbPress Style
-------------------------------------------------------------- */
@cdils
cdils / functions.php
Last active December 21, 2016 20:14
Display a Logo (or Avatar) Before the Site Title - See accompanying tutorial at http://www.carriedils.com/display-logo-before-site-title/
<?php // remove this line.
add_action( 'genesis_header', 'cd_site_image', 5 );
/**
* Output image before site title.
*
* Checks to see if a header image exists. If so, output that in an `img` tag. If not, get
* the Gravatar associated with the site administrator's email (under Settings > General).
*
* @see get_header_image() Retrieve header image for custom header.
@cdils
cdils / archive-team.php
Last active January 31, 2016 18:24
Here's the Genesis tutorial that references these files: http://www.carriedils.com/remove-links-genesis-custom-archive-page-template/
<?
/**
* Team Archive template
*/
// Remove default post title (with link)
remove_action( 'genesis_entry_header','genesis_do_post_title' );
add_action( 'genesis_entry_header','cd_archive_title' );
/**
@cdils
cdils / functions.php
Created February 23, 2015 18:20
Add latest post revision date to Genesis post info.
<?php //remove this line
add_filter( 'genesis_post_info', 'cd_post_info_filter' );
function cd_post_info_filter( $post_info ) {
if ( ! is_singular( 'post' ) ) {
$post_info = '[post_date] by [post_author_posts_link] [post_comments]';
$post_modified_info = '[post_modified_date before="<br />Last updated "]';
return $post_info . $post_modified_info;
@cdils
cdils / example-typekit.css
Created January 13, 2015 02:28
Example of overriding Style Customizer fonts with a Typekit font. (For additional context see http://www.carriedils.com/typekit-rainmaker/)
/*
Note the .site-container class - this adds extra specification to areas
where the Style Customizer is applying styles. You can directly target
other styles that come directly from the theme (hint: you can identify them
because they don't include the .gppro-custom class)
------*/
body.gppro-custom .site-container,
body.gppro-custom .site-container .genesis-grid .entry-meta,
body.gppro-custom .site-container .entry-header .entry-meta,
body.gppro-custom .site-container .site-footer p,
<?php // Remove this entire line
// Add custom class to the body tag
add_filter( 'body_class', 'add_body_class' );
function add_body_class( $classes ) {
$classes[] = 'name-of-class';
return $classes;
}
@cdils
cdils / page_landing.php
Created November 2, 2014 17:29
Landing page template for the Utility Theme
<?php
/**
* This file adds the Landing template to the Utility Theme.
*
* @author Carrie Dils
* @package Utility
* @subpackage Customizations
*/
/*
@cdils
cdils / functions.php
Last active April 26, 2017 11:07
Remove Pagination from an archive
<?php //remove this entire line
// Remove Pagination from a custom post type
add_action( 'parse_query', 'cd_nopaging' );
function cd_nopaging( $query ) {
if ( is_post_type_archive( 'your-cpt' ) ) {
$query->set( 'nopaging', 1 );
}