Multi str_replace php
str_replace( array( '<', '>', '/', ',', '{', '}', '?', '*' ), '', $value[0]->post_content )
How to get paid membership pro membership level ID? Copy the codes below. function get_user_member_level_id( $userid ){ global $wpdb; return $wpdb->get_var( "SELECT membership_id FROM wp_pmpro_memberships_users WHERE user_id = $userid" ); } echo get_user_member_level_id( $userid );
Add BCC email in Woocommerce new order via product post meta? How to do that? Create a custom field with a meta_key of ’email_address’ and put the codes to your functions.php add_filter( ‘woocommerce_email_headers’, ‘mycustom_headers_filter_function’, 10, 2 ); function mycustom_headers_filter_function( $headers, $object ) { if( $object == ‘new_order’ ){ global $woocommerce; $cart = $woocommerce->cart; if(!empty($cart)){ $group…
Customize rtmedia gallery ( media-gallery-item.php ) with additional display like image, audio, video, etc. Are you having a problem adding custom information on the media gallery item? You don’t have to worry now, the codes below is the solution. In my example, I want to add an audio player and the same time this is…
How to get the current post parent category ID? Just copy the codes below and paste this your template. global $post; $category = get_the_category( get_the_ID() ); $parent = $category[0]->term_id
WDES rtMedia Music template override All files inside the “templates” folder can be override in your current theme/child theme. To do that, create a “wdes-rtmedia-music” in your current theme/child theme and place the template file inside of “wdes-rtmedia-music” folder. Example: You want to override the “all.php” to your theme/child theme. wdes-rtmedia-music > lib > templates > all.php Override…
Copy this this on your choosed templates. Locate a file code : locate_template( array( 'function-custom.php' ), true ); Require a file code : require_once( 'functions-custom.php' ); Include a file code : include( 'functions-custom.php' ); Get template functions-woocommerce.php Ex: get_template_part( ‘partials/content’, ‘page’ ); get_template_part( 'functions-woocommerce' );