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 | |
//* 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_action( 'genesis_entry_footer', 'tj_subpage_navigation' ); | |
/** | |
* Adds page links to the descendants of page ID 6. | |
* | |
*/ | |
function tj_subpage_navigation() { | |
//* Return early if not on a page or if on the front page | |
if ( ! is_page() || is_front_page() ) | |
return; |
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() ); |
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 | |
$config = array( | |
array( | |
'name' => 'prefix_subtitle', | |
), | |
array( | |
'name' => 'prefix_content_row', | |
'sub_fields' => array( | |
array( | |
'name' => 'css_classes', |
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 | |
array( | |
'prefix_subtitle' => 'This is the subtitle', | |
'prefix_content_row' => array( | |
array( | |
'css_classes' => 'extra-class row-1', | |
'background_color' => '1', | |
'columns' => array( | |
array( | |
'column' => 'Row 1 column 1', |
OlderNewer