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
============================================================ | |
Add to Col 1 Content (in "Text" NOT "Visual" mode): | |
============================================================ | |
<div class="voegtlin-header"> | |
<strong>Latest Article</strong> | |
[display-posts category="blog" posts_per_page="1" wrapper="div"] | |
</div> | |
============================================================ | |
Add to Col 2 Content (in "Text" NOT "Visual" mode): |
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
add_action( 'init' , 'custom_add_and_remove' , 15); | |
function custom_add_and_remove() { | |
remove_action( 'sermon_excerpt', 'wpfc_sermon_excerpt' ); | |
add_action( 'sermon_excerpt', 'custom_wpfc_sermon_excerpt' ); | |
} | |
function custom_wpfc_sermon_excerpt() { | |
global $post;?> | |
<div class="wpfc_sermon_wrap cf"> | |
<div class="wpfc_sermon_image"> |
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
remove_action( 'rss_ns', 'wpfc_podcast_add_namespace' ); | |
remove_action( 'rss2_ns', 'wpfc_podcast_add_namespace' ); | |
remove_action('rss_head', 'wpfc_podcast_add_head'); | |
remove_action('rss2_head', 'wpfc_podcast_add_head'); | |
remove_action('rss_item', 'wpfc_podcast_add_item'); | |
remove_action('rss2_item', 'wpfc_podcast_add_item'); | |
remove_filter( 'the_content_feed', 'wpfc_podcast_summary', 10, 3); | |
remove_filter( 'the_excerpt_rss', 'wpfc_podcast_summary'); |
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 | |
// Get categories | |
$categories = get_categories(); | |
// Initate an empty array | |
$cat_options = array(); | |
if ( !empty( $categories ) ) { | |
foreach ( $categories as $key => $term ) { | |
$cat_options[] = array( | |
'name' => $term->name, | |
'value' => $term->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
// Make the main sermon page only show sermon from a particular service type | |
function redeemer_sermon_order_query( $query ) { | |
if ( !is_admin() && $query->is_main_query() ) : | |
if( is_post_type_archive('wpfc_sermon') ) { | |
$query->set('wpfc_service_type', 'REPLACETHISWITHYOURSERVICETYPESLUG'); | |
} | |
endif; | |
} | |
add_action('pre_get_posts', 'redeemer_sermon_order_query', 999); |
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 | |
$args = array( | |
'post_type' => 'wpfc_sermon', | |
'order' => 'DESC', | |
'meta_key' => 'sermon_date', | |
'meta_value' => date("m/d/Y"), | |
'meta_compare' => '>=', | |
'orderby' => 'meta_value', | |
'posts_per_page' => 1 | |
); |
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
function jack_edd_changelog_shortcode($atts = 0) { | |
extract( shortcode_atts( array( | |
'id' => '0', | |
), | |
$atts ) ); | |
return get_post_meta( $id, '_edd_sl_changelog', true ); | |
} | |
add_shortcode( 'changelog', 'jack_edd_changelog_shortcode' ); |
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
<div id="wpfc_sermon_tax_description" class="clearfix"> | |
<?php | |
/* Image - Change 'content-width' to any registered image size */ | |
print apply_filters( 'sermon-images-queried-term-image', '', array( 'attr' => array( 'class' => 'alignleft post-thumb' ), 'after' => '</div>', 'before' => '<div id="wpfc_sermon_image">', 'image_size' => 'content-width', ) ); | |
/* Description */ | |
$category_description = category_description(); | |
if ( ! empty( $category_description ) ) | |
echo '<div class="sermon-tax-description">' . $category_description . '</div>'; | |
?> | |
</div> |
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
/* | |
* Prints a list of all licenses for a user ID | |
*/ | |
function jack_edd_license_list($customer) { | |
$purchases = edd_get_users_purchases( $customer, 20, true ); | |
if ( $purchases ) : | |
foreach ( $purchases as $purchase ) : setup_postdata( $purchase ); | |
$downloads = edd_get_payment_meta_downloads( $purchase->ID ); | |
//echo '<pre>'; print_r( $downloads ); echo '</pre>'; |
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
add_action( 'edd_sl_store_license', 'jack_edd_license_length_options', 10, 3 ); | |
function jack_edd_license_length_options( $license_id, $download_id, $payment_id ) { | |
$purchase_details = edd_get_payment_meta_cart_details( $payment_id, $include_bundle_files = true); | |
$item = array(); | |
foreach( $purchase_details as $item ) { | |
if( edd_is_bundled_product( $item['id'] ) ) { | |
$bundled_products = edd_get_bundled_products( $download_id ); | |
foreach( $bundled_products as $bundle_item ) { |
NewerOlder