strange issue with user_meta + json_encode/decode
strange issue with user_meta + json_encode/decode
strange issue with user_meta + json_encode/decode
How to create user specific pages (not user role!)?
Consider custom post type of ‘Contest transactions’ parent posts could be the contest, then you can use the post meta meta_key => initial signup, meta-value => +5 meta_key => refunded_order, meta-value => -12 and then you could a query adding up all the transactions. I prefer to use wp tables and structures where possible as … Read more
so James in order to achieve your goal you need to remove the meta-box and re-add it with the new callback that contain the new value; so lets assume originally you have the meta-box added as below : function adifier_custom_meta() { $screens = [‘page’, ‘post’]; foreach ($screens as $screen) { add_meta_box( ‘advert_cond’, // Unique ID … Read more
The following worked for me: <?php echo get_avatar( $comment, 60, ”, ”, $args = array( ‘scheme’ => ‘https’, ‘class’ => ‘myclass’ ) ); ?> Your use of $args[‘avatar_size’] should be an int and you may have confused the use of this parameter (unless you have a variable $args, and it is an array).
your code is not working, because you use strtotime incorrectly… It should be used like this: int strtotime ( string $time [, int $now ] ) But you pass formatted dated as first param, and another string as second one. So how should it look like? Like so: $addeddays = intval( get_user_meta($this->order->user_id, ‘xxx’, true) ); … Read more
I don’t know the context, but i got your use case working like this: Add new permastruct and make sure to regenerate permalinks (Settings > Permalinks > Save) /** * Add additional permalink * * @uses https://codex.wordpress.org/Plugin_API/Action_Reference/init */ function wpte_add_permastruct(){ add_permastruct( ‘%author_trip_vendor%’, ‘operator/%author%’, [ ‘ep_mask’ => EP_AUTHORS, ]); } add_action( ‘init’, ‘wpte_add_permastruct’ ); Added this … Read more
How can I save unique user data on my site? [closed]
I’d simply go for WP_User_Query for this: $args = [ ‘meta_key’ => ‘is_registered’, ‘meta_value’ => ‘Yes’, ‘fields’ => ‘ID’, ]; $user_query = new WP_User_Query($args);
This happens due to the nature of ajax calls – they are asynchronous. When you have a lengthy function (or heavy plugins and slow site loading), several ajax calls are running at the same time, and nobody can predict, which one will get access to db data faster. Usage of own tables is not a … Read more