How to restore post to pending status (no draft)

The official documentation for wp_untrash_post documents a filter for setting the status that it will use: https://developer.wordpress.org/reference/functions/wp_untrash_post/ This filter can be used to return pending instead as the status. If that’s not an option though, you could set the post status to pending after calling wp_untrash_post, it doesn’t have to happen in a single function … Read more

How to delete Full Size options from post Add Media?

function remove_extra_image_sizes() { foreach ( get_intermediate_image_sizes() as $size ) { if ( in_array( $size, array( ‘full’ ) ) ) { remove_image_size( $size ); } } } add_action(‘init’, ‘remove_extra_image_sizes’); Ref: remove_image_size() function I think this will help you.

Adding a new custom post type using the editor causes 502 bad gateway error

I did some further research and testing, and found the issue to be related to nginx and not WordPress itself. The following Stack Overflow post included some configuration adjustments for the site’s config file that resolved the 502 bad gateway issues. My configuration file’s client_max_body_size was already set to 64M. Here are the nginx settings … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)