Skip to content

Instantly share code, notes, and snippets.

Steven Gliebe stevengliebe

Block or report user

Report or block stevengliebe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@stevengliebe
stevengliebe / ct-agency-mode.php
Last active Oct 25, 2018
How to enable Church Content Pro "Agency Mode" in wp-config.php. https://churchthemes.com/go/agency-mode/
View ct-agency-mode.php
<?php
/**
* ChurchThemes.com Agency Mode
*
* See https://churchthemes.com/go/agency-mode/ for information.
* PHP 5.6+ is required. You can use define() with PHP 7+.
*/
const CT_AGENCY_MODE = array(
'name' => 'Acme Agency', // Agency or freelancer name to show user.
@stevengliebe
stevengliebe / ctfw-google-maps-api-key.php
Last active Mar 29, 2019
Example from Church Theme Framework of how to get the Church Content plugin's Google Maps API Key.
View ctfw-google-maps-api-key.php
<?php
function ctfw_google_maps_api_key() {
$key = '';
// Make sure the Church Content plugin's function is available
if ( function_exists( 'ctc_setting' ) ) {
$key = ctc_setting( 'google_maps_api_key' );
}
View load-church-theme-framework.php
<?php
/**
* Load framework
*/
require_once get_template_directory() . '/framework/framework.php'; // do this before anything
View ctc-field-overrides.php
<?php
'field_overrides' => array(
'_ctc_person_urls' => array(
'name' => __( 'New Title', 'yourtheme' ),
'desc' => __( 'Enter one URL per line.', 'yourtheme' )
),
'_ctc_person_email' => array(
'desc' => sprintf( __( 'The WordPress <a href="%s" target="_blank">antispambot</a> function is used to help deter automated email harvesting.', 'yourtheme' ), 'http://codex.wordpress.org/Function_Reference/antispambot' )
)
View ctc-recommended.php
View ctc-basic.php
<?php
function yourtheme_add_ctc_support() {
/**
* Plugin Support
*
* Tell plugin theme supports it. This leaves all features disabled so they can
* be enabled explicitly below. When support not added, all features are revealed
* so user can access content (in case switched to an unsupported theme).
@stevengliebe
stevengliebe / responsive-embeds.js
Created Aug 26, 2015
responsive-embeds.js from Church Theme Framework with support for LiveStream
View responsive-embeds.js
/**
* Responsive Embeds
*/
jQuery( document ).ready( function( $ ) {
// Remove <object> element from Blip.tv ( use iframe only ) - creates a gap w/FitVid
$( "embed[src*='blip.tv']" ).remove();
// Use FitVid for responsive videos and other embeds
@stevengliebe
stevengliebe / ctc-change-sermon-slug.php
Last active Sep 1, 2017
Example of how to change Church Content plugin post type URL slug (e.g. "sermons" to "messages")
View ctc-change-sermon-slug.php
<?php
/**
* Change sermon slug in URL
*
* Example of how to change sermon slug in Church Content plugin.
* This is ideally placed in your own functionality plugin so that it works after switching themes.
*
* REQUIRED: Go to Settings > Permalinks and save after applying this, or it will not take effect
*
View excerpt-filter.php
<?php
/**
* Filter the_excerpt to show content in a more ideal way.
*
* The way content is shown depends on the priority of a situation:
*
* 1. the_content with "Read More" link if the "More" tag is used
* 2. Manual excerpt with "Read More" link if excerpt is manually entered
* 3. the_content in its entirety if less than 200 words (nicer than automatic excerpt)
You can’t perform that action at this time.