This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* The Gravity form number where the user signs up for your Dreamhost Announce list | |
$gf_num = 2; | |
//* Transmit the data to Dreamhost after the form has been submitted | |
add_action('gform_after_submission_' . $gf_num , 'tj_send_to_dreamhost', 10, 2); | |
function tj_send_to_dreamhost($entry) { | |
$key = 'XXXXXXXXXXX'; //* unique key obtained from Dreamhost at https://panel.dreamhost.com/?tree=home.api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Push data from Donations page to Google sheets. One form submission can populate several rows in the Google Sheet */ | |
// Make sure the trailing number (gform_after_submission_X) corresponds with the correct form number | |
add_action('gform_after_submission_1', 'add_to_google_spreadsheet_recurring', 10, 2); | |
function add_to_google_spreadsheet($entry, $form) { | |
// This is the web app URL of the Google Script running on the Google sheet | |
$post_url = "https://script.google.com/macros/s/XXXXXXXXX"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Modify the header URL - XHTML Version | |
add_filter('genesis_seo_title', 'sp_seo_title', 10, 3); | |
function sp_seo_title($title, $inside, $wrap) { | |
$inside = sprintf( '<a href="http://www.yourdomain.com" title="%s">%s</a>', esc_attr( get_bloginfo('name') ), get_bloginfo('name') ); | |
$title = sprintf('<%s id="title">%s</%s>', $wrap, $inside, $wrap); | |
return $title; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: Two Categories in Two Rows | |
* | |
*/ | |
//* Remove the standard loop | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
//* Add classes to display the posts in a grid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Require our dependencies | |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var browserSync = require('browser-sync').create(); | |
gulp.task('styles', function(){ | |
return gulp.src('sass/style.scss') | |
.pipe(sass({ | |
outputStyle: 'expanded', // Options: nested, expanded, compact, compressed | |
indentType: 'tab', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Register widget areas | |
genesis_register_sidebar( array( | |
'id' => 'parallax-section-below-header', | |
'name' => __( 'Parallax Section Below Header', 'your-theme-slug' ), | |
'description' => __( 'This is the parallax section below header.', 'your-theme-slug' ), | |
) ); | |
genesis_register_sidebar( array( | |
'id' => 'parallax-section-above-footer', | |
'name' => __( 'Parallax Section Above Footer', 'your-theme-slug' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Remove post info conditionally | |
add_action( 'genesis_before_entry' , 'tj_remove_post_info' ); | |
/** | |
* Remove post info from posts except from the Devotional post type | |
* | |
* @return void | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This function is triggered when the WordPress theme is changed. | |
* It checks if the Genesis Framework is active. If not, it deactivates the plugin. | |
* | |
* @since 1.0 | |
* @author Chimnoy Paul | |
*/ | |
function gcfws_plugin_deactivate() { | |
if ( ! function_exists( 'genesis' ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'excerpt_more', 'tj_excerpt_more_link' ); | |
/** | |
* Modify the excerpt more link for standard excerpts | |
* | |
* @param string, default read more link | |
* @return string, modified read more link | |
*/ | |
function tj_excerpt_more_link( $more ) { | |
$more_link = tj_custom_more_link(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Calls the page link functions on pages that are descendants of $greatest_ancestor | |
* | |
* @param int $greatest_ancestor The ID of the top level ancestor | |
*/ | |
function tj_page_navigation_links( $greatest_ancestor ) { | |
//* Get the ancestors of the current page | |
$page_ancestors = get_post_ancestors( get_the_ID() ); |
OlderNewer