Skip to content

Instantly share code, notes, and snippets.

View PurpleHippoDesign's full-sized avatar

Angie Vale PurpleHippoDesign

View GitHub Profile
@vividvilla
vividvilla / remove-date-from-category.php
Last active December 28, 2015 08:51
Remove Dates from Posts in Particular Category : Genesis Framework
<?php
//* Do NOT include the opening php tag
//* Customize the entry meta in the entry header */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if( in_category( array('cat-1','cat-2') )) {
$post_info = 'Posted by [post_author_posts_link] [post_comments] [post_edit]';
}
else {
@srikat
srikat / front-page.php
Last active September 21, 2017 14:25
Front Page Template to show CPT entries in a 3-column grid in Genesis. http://sridharkatakam.com/front-page-template-show-cpt-entries-3-column-grid-genesis/
<?php
/**
* To display entries from a Custom Post Type on site's front page in a 3-column responsive grid.
* URL: http://sridharkatakam.com/front-page-template-to-show-cpt-entries-in-a-3-column-grid-in-genesis/
*/
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'sk_do_loop' );
/**
@cdils
cdils / proper-table-markup.html
Last active December 9, 2018 00:41
Bootstrap table styles (See tutorial to add Bootstrap table styles to your theme -> https://carriedils.com/add-bootstrap-table-styles-theme/)
<!--
<thead> Groups the header content in a table
<th> Defines a header cell in a table
<tbody> Groups the body content in a table
<td> Defines a cell in a table
-->
<table>
<thead>
add_filter( 'genesis_post_info', 'remove_post_info_exclude_news_category' );
/**
* @author Brad Dalton
* @link http://wpsites.net/web-design/modify-post-info-genesis
*/
function remove_post_info_exclude_news_category($post_info) {
if ( in_category('news') ) {
$post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit]';
return $post_info;
}
@studiopress
studiopress / genesis-read-more.php
Last active August 10, 2020 09:51
Genesis post excerpts.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Modify the Genesis content limit read more link
add_filter( 'get_the_content_more_link', 'sp_read_more_link' );
function sp_read_more_link() {
return '... <a class="more-link" href="' . get_permalink() . '">[Continue Reading]</a>';
}
@cparkinson
cparkinson / facetwp-autoindex-child-terms.php
Created May 13, 2020 16:22
FacetWP - automatically index all child terms when a parent taxonomy term is checked
/**
* Filter to customize FacetWP, should be pasted in FacetWP's "Custom Hooks" plugin
*
* Made for a "location" FacetWP autocomplete filter that uses a taxonomy "location"
* consisting of parent county terms and child city terms
*
* When indexing, for every post, for the location taxonomy filter,
* Check to see if it has any location taxonomy set
* Check to see if selected location taxonomy has children (i.e. selected county has cities)
* Create a new index row for each child city
@GaryJones
GaryJones / functions.php
Last active April 19, 2021 23:12
Apply superfish enhancement to usual Genesis menus with different settings.
<?php
// For Genesis 2.0.0 and later:
add_filter( 'genesis_superfish_args_url', 'prefix_superfish_args_url' );
/**
* Filter in URL for custom Superfish arguments.
*
* @author Gary Jones
* @link http://code.garyjones.co.uk/change-superfish-arguments
@paaljoachim
paaljoachim / genesis-featured-image.php
Last active April 16, 2022 14:52
Featured image for Genesis themes. 1. Sets the featured image. 2. If no featured image get image from category. 3. If no category image then get the first post image. 4. If no post image or category image then sets a fallback image.
@rickrduncan
rickrduncan / genesis-page-titles-html5.php
Last active August 1, 2022 11:16
How to remove page titles from Genesis child themes using XHTML and HTML5 methods.
<?php
//* Do NOT include the opening php tag
//* ALL EXAMPLES ON THIS PAGE USE THE NEW HTML5 METHOD
//* Remove page titles site wide (posts & pages) (requires HTML5 theme support)
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
@robneu
robneu / wordpress-typekit-enqueue.php
Last active January 17, 2023 23:04 — forked from FernE97/typekit-enqueue.php
Enqueue typekit fonts to WordPress using wp_enqueue_scripts.
<?php
/**
* Enqueue typekit fonts into WordPress using wp_enqueue_scripts.
*
* @author Robert Neu
* @author Eric Fernandez
* @copyright Copyright (c) 2014, Robert Neu
* @license GPL-2.0+
* @link http://typekit.com
*/