Category: Archive
change search url
function wpb_change_search_url() { if ( is_search() && ! empty( $_GET[‘s’] ) ) { wp_redirect( home_url( “/search/” ) . urlencode( get_query_var( ‘s’ ) ) ); exit(); } } add_action( ‘template_redirect’, ‘wpb_change_search_url’ );Continue reading
Chatbot de voz
Plural Category Names – Helper and Archive Display
function get_term_plural_name($term_id, $taxonomy = ‘category’) { $plural = get_term_meta($term_id, ‘plural_name’, true); return $plural ?: get_term($term_id, $taxonomy)>name; } add_filter(‘get_the_terms’, function ($terms, $post_id, $taxonomy) { if (is_archive() || is_home()) { // Only for list contexts foreach ($terms as $term) { $plural =…Continue reading
aboutsblocks.com
ภาษาไทย: https : //pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3968759292085187Continue reading
muestra
http://bucketvisualizadorvplant.s3-website-us-east-1.amazonaws.com/practicas/Bombas-centr%C3%ADfugasContinue reading
MemberPress: Import Dropdown Options for Custom Fields
function mepr_cust_import_options() { if( isset( $_REQUEST[‘import-options’] ) ) { // For this code snippet to work, a custom dropdown field must be created at Dashboard > MemberPress > Settings > Fields tab. $mepr_options = MeprOptions::fetch( true ); $key = ‘mepr_custom_dropdown’;…Continue reading
MemberPress: Set UK Transactions VAT to 0
function mepr_cust_uk_vat( $vat_countries ) { if( isset( $vat_countries ) ) { $gb = $vat_countries[‘GB’]; if ( isset( $gb ) ) { $gb[‘rate’] = 0; $vat_countries[‘GB’] = $gb; } } return $vat_countries; } add_filter( ‘mepr-vat-countries’, ‘mepr_cust_uk_vat’ );Continue reading
MemberPress: Tax Only UK
function mepr_cust_tax_only_uk( $tax_rate, $country, $state, $postcode, $city, $street, $user, $prd_id ) { if ( $country != ‘GB’ ) { $tax_rate->tax_rate = 0.0; } return $tax_rate; } add_filter( ‘mepr_find_tax_rate’, ‘mepr_cust_tax_only_uk’, 99, 8 );Continue reading
MemberPress: Add Address Fields to Authorize.net
function add_address_to_recurring( $args, $txn, $sub ) { $user = new MeprUser( $txn->user_id ); if ( $user->address_is_set() ) { $addr = $user->full_address( false ); $args[‘subscription’][‘billTo’][‘address’] = $addr[‘mepr-address-one’] . ( isset($addr[‘mepr-address-two’] ) ? ‘ ‘ . $addr[‘mepr-address-two’] : ” ); $args[‘subscription’][‘billTo’][‘city’] =…Continue reading