Display Random Posts

$number_of_posts = 5; // Change this to the number of random posts you want to display. $title = ‘You might also like:’; // This is the title that will be displayed above the list of posts. $current_post_id = get_the_ID(); $args…Continue reading

Hide admin nags

.notice .is-dismissable { display: none; } /* In WordPress, set this to be inserted into the admin footer. That option is unavailable on the library website */Continue reading

Adds URL to pages window

add_filter(‘manage_page_posts_columns’, ‘my_custom_column’, 10); add_action(‘manage_page_posts_custom_column’, ‘add_my_custom_column’, 10, 2); function my_custom_column($defaults) { $defaults[‘url’] = ‘URL’; return $defaults; } function add_my_custom_column($column_name, $post_id) { if ($column_name == ‘url’) { $siteURL=get_site_url($post_id); $link= get_permalink( $post_id ); echo str_replace($siteURL,””,$link); } }Continue reading