Ajax Check Post Status

So basicly you want an ajax method that checks for post changes. Here’s a great article on WP ajax for front & back-end. In short you want to do the following: Load the Ajax JS script on the pages you want to show the notification popup. Create wp ajax server-side handling, with hook wp_ajax_{your_custom_action}. OR … Read more

Add count for new registered user in Users tab

Yes, there is. You can use admin_menu hook to loop through menu items and add span with notification. There are two classes that WP uses for these notifications update-plugins and awaiting-mod. The second one looks more appropriate in this case, I guess… Here’s some code: function add_user_menu_notification() { global $menu; $user_count = count_users(); // get … Read more

How to get current post user id

To show author avatar per post inside loop you need to modify a little: $current_post_author_id = get_the_author_meta( ‘ID’ ); <?php if (!empty(get_user_meta($current_post_author_id, ‘user_avatar’, true))): ?> <img src=”https://wordpress.stackexchange.com/questions/317789/<?php echo get_user_meta($current_post_author_id,”user_avatar’, true); ?>” alt=”some text”> Try, if it works for you.

WordPress User Taxonomy Saved Values

There are two errors in your code. First one is the inconsistency in field names. Here’s your checkbox field: <input type=”checkbox” name=”competence-<?php echo esc_attr( $term->slug ); ?>” id=”competence-<?php echo esc_attr( $term->slug ); ?>” value=”<?php echo esc_attr( $term->slug ); ?>” <?php checked( true, is_object_in_term( $user->ID, ‘competence’, $term ) ); ?> /> And here’s the part you’re … Read more

Filter users by custom colum not meta key

This isn’t possible with custom table columns, and you should avoid and move away from custom modifications to WP Core tables. Instead, store this data in user meta instead of custom table columns. When you next update WordPress, if the database schema will change, WP will adjust the tables to match, destroying your custom columns … Read more