function evocalux_display_username() { if ( is_user_logged_in() ) { $current_user = wp_get_current_user(); return esc_html( $current_user->display_name ); } else { return ‘beautiful soul’; } } add_shortcode( ‘user_name’, ‘evocalux_display_username’ );Continue reading
function evocalux_display_username() { $current_user = wp_get_current_user(); if ( is_user_logged_in() && ! empty( $current_user->display_name ) ) { return esc_html( $current_user->display_name ); } else { return ‘beautiful soul’; } } add_shortcode(‘user_name’, ‘evocalux_display_username’);Continue reading
$u_time = get_the_time( ‘U’ ); $u_modified_time = get_the_modified_time( ‘U’ ); // Only display modified date if 24hrs have passed since the post was published. if ( $u_modified_time >= $u_time + 86400 ) { $updated_date = get_the_modified_time( ‘Y-m-d’ ); $updated_time =…Continue reading
add_filter( ‘wpcode_smart_tags’, function( $tags ) { $tags[‘custom’] = array( ‘label’ => ‘Custom’, ‘tags’ => array( ‘custom_field_tag’ => array( ‘label’ => ‘Custom Field Tag’, ‘function’ => ‘wpcode_custom_field_tag’, ), ), ); return $tags; } ); function wpcode_custom_field_tag() { // Replace custom_field_tag below…Continue reading
function custom_purchase_info_shortcode() { global $wpdb; // Get the current user ID $user_id = get_current_user_id(); // Get the latest MemberPress transaction for this user $latest_transaction = $wpdb->get_row( $wpdb->prepare( “SELECT * FROM {$wpdb->prefix}mepr_transactions WHERE user_id = %d ORDER BY id DESC LIMIT…Continue reading
add_action(‘wp_footer’, function() { ?>Continue reading
function my_custom_css() { echo ‘ ‘; } add_action(‘admin_head’, ‘my_custom_css’);Continue reading
function mepr_set_default_country_script() { ?>Continue reading
function replace_text_in_price_box() { ?>Continue reading