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 //* Mind this opening php tag and header information below | |
/* | |
Plugin Name: Create EDD Discounts with Gravity Forms | |
Plugin URI: http://engagewp.com/create-random-discount-codes-edd-gravity-forms | |
Description: Allows discount codes for Easy Digital Downloads to be randomly generated on Gravity Forms submissions. Code credit to David Smith of GravityWiz.com. Modified and put into plugin format by Ren Ventura. | |
Author: David Smith / Ren Ventura | |
Version: 1.0 | |
*/ |
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 // Mind this opening php tag | |
/** | |
* Remove Categories from WooCommerce Product Category Widget | |
* | |
* @author Ren Ventura | |
*/ | |
//* Used when the widget is displayed as a dropdown | |
add_filter( 'woocommerce_product_categories_widget_dropdown_args', 'rv_exclude_wc_widget_categories' ); |
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 //* Mind this opening PHP tag | |
//* Reposition Page Title | |
add_action( 'genesis_before', 'centric_post_title' ); | |
function centric_post_title() { | |
if ( is_page() and !is_page_template() ) { | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
add_action( 'genesis_after_header', 'centric_open_post_title', 1 ); | |
add_action( 'genesis_after_header', 'genesis_do_post_title', 2 ); |
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 //* Mind this opening PHP tag | |
//* Reposition Page Title | |
add_action( 'genesis_before', 'centric_post_title' ); | |
function centric_post_title() { | |
if ( is_page() && !is_page_template() ) { | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
add_action( 'genesis_after_header', 'centric_open_post_title', 1 ); | |
add_action( 'genesis_after_header', 'genesis_do_post_title', 2 ); |
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 //* Mind this opening PHP tag | |
function centric_open_post_title() { | |
echo '<div class="page-title"><div class="wrap">'; | |
} | |
function centric_close_post_title() { | |
echo '</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
<?php //Mind this opening PHP tag | |
/**************************************************************** | |
Project Shortcode | |
****************************************************************/ | |
// Add Project Details Shortcode | |
add_shortcode( 'project_info', 'project_info' ); | |
function project_info( $atts ) { |
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 //* Mind this opening PHP tag | |
/** | |
* This snippet creates a shortcode that renders the content of a | |
* licensed download/product's change log in Easy Digital Downloads. | |
* | |
* Example: [edd_changelog download_id="0000"] (replace 0000 with the ID of a download post) | |
* | |
* @author Ren Ventura <EngageWP.com> | |
* @link https://www.engagewp.com/include-easy-digital-downloads-software-licensing-change-logs-posts/ |
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 //* Mind the opening PHP tag | |
/* | |
* Changes the main query on the home page (blog posts index) to one or more custom post types | |
*/ | |
add_filter( 'pre_get_posts', 'my_custom_query' ); | |
function my_custom_query( $query ) { | |
if ( $query->is_main_query() && $query->is_home() ) { |