mailpoet close css

/* 弹窗的基本样式 */ .mp_form_popup1 { transition: all 0.3s ease; /* 为弹窗的过渡动画添加平滑效果 */ position: fixed; bottom: 20px; /* 放置在屏幕底部 */ right: 20px; /* 放置在屏幕右侧 */ z-index: 9999; width: 300px; height: 400px; background-color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);…Continue reading

Add Last Modified Column

add_filter( ‘manage_posts_columns’, function ( $columns ) { $columns[‘last_modified’] = __( ‘Last Modified’ ); return $columns; } ); add_action( ‘manage_posts_custom_column’, function ( $column, $post_id ) { if ( ‘last_modified’ === $column ) { $modified_time = get_the_modified_time( ‘Y/m/d g:i:s a’, $post_id );…Continue reading

Author Bio After Post

global $post; $author_id = $post->post_author; // Get author’s display name and biographical info $author_name = get_the_author_meta( ‘display_name’, $author_id ); $author_bio = get_the_author_meta( ‘description’, $author_id ); // Get author’s avatar $author_avatar = get_avatar( $author_id, 96 ); // Only display if author…Continue reading

Assign User Role Conditionally in WordPress

/** * Assigns a specific WordPress user role based on the selected value in a WPForms multiple-choice field. * * @link https://wpforms.com/how-to-assign-user-roles-conditionally-in-wordpress/ * * @param array $user_data Array containing user registration data. * @param array $fields Array of form fields…Continue reading