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
//Place in functions.php | |
//removes WP version from header | |
function healingartsweb_remove_version() { | |
return ''; | |
} | |
add_filter('the_generator', 'healingartsweb_remove_version'); |
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 | |
/* | |
---------------------------------------------------------------------------------- | |
Ouput content for blog page (Settings > Static page > posts page) page above posts | |
---------------------------------------------------------------------------------- | |
*/ | |
function wphandcrafted_add_blog_page_content() { | |
if ( is_home() ) { | |
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 | |
if (isset($_GET['firstname'])) { //we have a first name to work with | |
$firstname = $_GET['firstname']; | |
echo '<p>Hi '.$firstname.', here is your download.</p>'; | |
} else { //there isn't a first name variable, so decide what to do |
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 | |
/* | |
------------------------------------------------------------------------------------------ | |
Change Membership Content to Online Courses on membership content page | |
------------------------------------------------------------------------------------------ | |
*/ | |
function custom_exchange_membership_content_title( $translated_text ) { |
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 default thumbnail for products on Store page | |
------------------------------------------------------------------------------------------ | |
*/ | |
function custom_exchange_default_product_image() { | |
if ( ! it_exchange( 'product', 'has-featured-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
<?php | |
/* | |
------------------------------------------------------------------------------------------ | |
Remove thumbnails from iThemes checkout and order confirmation | |
------------------------------------------------------------------------------------------ | |
*/ | |
function custom_exchange_get_content_cart_items_elements( $parts ) { |
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 | |
/* | |
Change Place Order button text on checkout page in woocommerce | |
*/ | |
add_filter('woocommerce_order_button_text','custom_order_button_text',1); | |
function custom_order_button_text($order_button_text) { | |
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('pre_get_posts','your_custom_search_filter'); | |
function your_custom_search_filter($query) { | |
if (!is_admin() && $query->is_search) { | |
$exclude_ids = array(1,2,3); //page ids you want to exclude | |
$query->set('post__not_in', $exclude_ids); | |
} |
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 //Slides loop | |
$args=array( | |
'post_type' => 'slide', //this is your cpt name | |
'post_status' => 'publish', | |
'posts_per_page' => -1, //this is the max number of slides | |
'orderby' => 'menu_order', | |
'order' => 'ASC' | |
); | |
$slide_query = new WP_Query($args); |
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 | |
if (is_product()) { | |
echo '<h1>Register</h1>'; | |
} elseif (is_cart()) { | |
echo '<h1>Review Order</h1>'; |
OlderNewer