how to display data from user panel using cmb2 metabox?

According to CMB2 documentation, instead of <img src=”<?php echo get_post_meta( get_the_ID(), ‘author_sign’, true) ?>” alt=””> you should use something like <?php echo wp_get_attachment_image( get_post_meta( get_the_ID(), ‘author_sign’, true ), ‘medium’ ); ?> or <img src=”<?php echo wp_get_attachment_image_url( get_post_meta( get_the_ID(), ‘author_sign’, true ), ‘medium’ ); ?>” alt=””>

Adding an item to an anonymous array inside a filter?

I added the capabilities now through this code. I’m not happy with my solution and it would be great if someone could find a proper way to add to the filter. I would be honestly interested to know how to make it properly work. add_action( ‘admin_init’, ‘jp_add_atum_caps_to_shop_manager’); function jp_add_atum_caps_to_shop_manager() { if(!user_can( 217 , ‘atum_read_inbound_stock’)) { … Read more

Rename a folder via HTML POST request

In order to rename you have to alter your code like bellow. You code was missing absolute path of the directory. That’s why your code was not working. Adding ABSPATH will fix the code. rename( ABSPATH . “wp-content/uploads/Directory/Clients/$Client_Name”, ABSPATH . “wp-content/uploads/Directory/Clients/$New_Name” ); Why not you use WP_Filesystem_Direct. It’s better and fatal-safe. You can easily use … Read more