Add a CSS class based on categroy id to archive pages

the link you gave has category class “category-26”, so therefore to add custom styling to this specific page you just have to define class .category-26 before any of your custom style, example of adding custom css to specific your category page : .category-26 article { background: #9999; } You can find specific category key with … Read more

How can I restrict image upload dimensions for non-admin WordPress users?

I’ve modified this answer from brasofilo. Modify the width and height values in the following line in the below code to your needs… $maximum = array( ‘width’ => 500, ‘height’ => 700 ); … and then add the code to your theme’s functions.php file. add_action( ‘admin_init’, ‘wpse_371740_block_authors_from_uploading_large_images’ ); function wpse_371740_block_authors_from_uploading_large_images() { if( !current_user_can( ‘administrator’) ) … Read more