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
/* This is an easy to read and follow transcript of the 2023 State of The Word Address, which can be found here: https://wordpress.org/news/2022/11/state-of-the-word-2022/ | |
The YouTube video transcripts are hard to follow and read, so I thought I would make it more accessible and create a transcript in Markdown which you can easily copy and paste and reference. | |
*/ | |
##Intro | |
[Speaker Josepha Haden Chomphosy:] | |
Hello all WordPressers of the world in New York. (Oh, that was really fast!) Most of the time when I just give people that call, they're like, "Oh, a lady is speaking. what should we 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
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); | |
add_action( 'woocommerce_single_product_summary', 'cs_woocommerce_template_single_add_to_cart', 30 ); | |
/* | |
* replace WooCommerce add-to-cart button with download link when product is downloadable & free for PaidMembershipPro | |
*/ | |
function cs_woocommerce_template_single_add_to_cart() { | |
global $product; | |
if ( pmpro_hasMembershipLevel(array('1','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
/** | |
* @snippet Hide Price & Add to Cart for Paid Membership Pro Members | |
* @how-to Add to code snippets or functions.php in theme | |
* @customize Change 1,2 to your membership level ID numbers | |
* @author Chelle Stein | |
* @testedwith WooCommerce 6.6.1 and PaidMembershipsPro 2.8.3 | |
*/ | |
add_filter( 'woocommerce_get_price_html', 'cs_hide_price_addcart_members', 9999, 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
/* Add affiliate disclosure before the content */ | |
function my_content_filter($content){ | |
//only add text before WordPress posts | |
if(is_single() && is_main_query()){ | |
$before = '<div class="disclosure">This post may contain affiliate links, which means we may earn a commission if you make a purchase. As an Amazon Associate we earn from qualifying purchases. Thank you for your support!</div>'; | |
$after = '<div class="after-entry"></div>'; | |
//modify the incoming content | |
$content = $before . $content . $after; |
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 | |
function rs_customtax() { | |
$list = wp_list_categories( array( | |
'taxonomy' => 'customtax', | |
'hide_empty' => 0, | |
'echo' => '', | |
'title_li' => '', | |
// other args here | |
) ); |
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
/* This code adds your header scripts to your WP site. */ | |
add_action('wp_head', 'cs_headerscripts'); | |
function cs_headerscripts(){ | |
?> | |
<!-- Paste Your Google Analytics and Other Scripts Here --> | |
<?php | |
}; |
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 Price, Cart and Star Raiting from WooCommerce Archive Pages - Show Just the Image and Title | |
remove_action ('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 ); | |
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart'); | |
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 ); |
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 Above Opening PHP tag | |
* Copy/Paste Below code into functions file | |
* Replace the -1 to your unique category id number | |
* More than 1 category can be separated by a comma | |
*/ | |
//* Function to Remove categories | |
function exclude_category_home( $query ) { |
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 | |
// Customize Profile Tabs | |
/* add a custom tab to show user pages */ | |
add_filter('um_profile_tabs', 'pages_tab', 1000 ); | |
function pages_tab( $tabs ) { | |
$tabs['pages'] = array( | |
'name' => 'Favorite Posts', |