Adjusting post width according to the image size

Markup: <div class=”post”> <div class=”thumbnail”> <img class=”thumb” src=”http://placehold.it/950×450/” /> </div> </div> CSS: .post { width: 500px; } .post img.thumb { width: 100%; /* fill available space of parent and keep aspect ratio */ } Fiddle: http://jsfiddle.net/

How to hide the year in archive link

You could use a regexp to remove the year, though it’s a little hacky: $string = wp_get_archives(‘type=monthly&limit=20&echo=0’); $pattern = ‘ ((19|20)\d{2}(</a>))’; echo preg_replace($pattern, ‘\\3’, $string); Answer from this stackoverflow question: https://stackoverflow.com/questions/5759720/have-wp-get-archives-return-a-string-with-no-year-in-it

disable trashability for certain pages

Add this to your functions.php in your theme folder: function restrict_post_deletion($post_ID){ $user = get_current_user_id(); $restricted_users = array(21,25,54,2,19); $restricted_pages = array(2,21,52,64); if(in_array($user, $restricted_users) && in_array($post_ID, $restricted_pages)){ echo “You are not authorized to delete this page.”; exit; } } add_action(‘wp_trash_post’, ‘restrict_post_deletion’, 10, 1); add_action(‘wp_delete_post’, ‘restrict_post_deletion’, 10, 1); Taken from here and updated to the latest WP version.

Content area is too small

You need to edit your theme’s CSS to do this. In style.css in your 2014 folder on line 1021: .site-content .entry-header, .site-content .entry-content, .site-content .entry-summary, .site-content .entry-meta, .page-content { margin: 0 auto; max-width: 474px; } change 474px to whatever you want your content width to go up to. Or set it to 100% to stay … Read more

Is WP Importer Safe on Multisite?

WP Importer is fine, providing the security of the site is in tact – meaning: No users with “admin” username secure passwords user registration disabled Salts configured properly in wp-config.php Renowned plugins ONLY – lots of plugins can be the cause of a weak link in a sites security, especially if the plugin provides any … Read more

Comment notification not working

I do not see the $comment_ID variable having any value in your code. So try by changing the following code wp_notify_postauthor($comment_ID, $comment->comment_type); to wp_notify_postauthor($comment->comment_ID, $comment->comment_type); You can also remove $comment->comment_type as per codex