Last Logged In Sortable Column

The default Last Login column only applies to users who are currently logged in. The timestamp is deleted when the user logs out. First, you need to save the timestamp when a user logs in. This will save it to user_meta. function save_login_timestamp( $user_login, $user ) { update_user_meta( $user->ID, ‘last_login’, time() ); } add_action( ‘wp_login’, … Read more

How to get blocks with same heigh in columns?

Finally, I found a solution with flex attributes: I defined the following CSS rules : .flexColumn { display: flex; flex-direction: column; align-self: auto !important; } .flexItem { flex-grow: 1 !important; } I can now apply flexColumn to the columns and flexItem to the items that I want to grow to fill the empty space: For … Read more

Creating two Columns on a Page. [closed]

You can do this with the CSS: .wp_cart_product_display_box {float:left;} You will probably want to add something like margin-right: 30px; to that. PS. You have a rogue </p> tag on the page also, check your content/template for syntax errors.

How to have two column on my index page?

It depends on the theme you are using. The index.php file in your theme applies to your home page. So if you change the HTML structure in there to be 3 columns, your home page should be 3 columns. Be careful though because index.php will also apply in some cases beyond the home page. Take … Read more

Can’t sort custom column on user.php by number / meta_value_num?

Instead of ‘request’ function, use this : add_action(‘pre_user_query’, ‘user_column_orderby’); function user_column_orderby($userquery){ if(‘Votes’==$userquery->query_vars[‘orderby’]) { global $wpdb; $userquery->query_from .= ” LEFT OUTER JOIN $wpdb->usermeta AS alias ON ($wpdb- >users.ID = alias.user_id) “; $userquery->query_where .= ” AND alias.meta_key = ‘wp__user_like_count’ “; $userquery->query_orderby = ” ORDER BY alias.meta_value “.($userquery->query_vars[“order”] == “ASC” ? “asc ” : “desc “); } }