20 ways to improve the experience of content editing in wordpress - wordcamp manchester 2015
TRANSCRIPT
20 ways to improve the experienceof content editing in WordPress
#wcmcr @jasoncsking
These code snippets can go in your theme's functions.php file
IMPROVING THE POST EDITOR
2. Excerpt length counter
http://premium.wpmudev.org/blog/character-counter-excerpt-box/
3. Make it easy to apply styles
https://codex.wordpress.org/TinyMCE_Custom_Styles
array( 'title' => 'Lead paragraph', 'selector' => 'p', 'classes' => 'lead','wrapper' => true,
), array(
'title' => 'Normal Button', 'selector' => 'p > a','classes' => 'btn btn-
primary','wrapper' => false,
),
4. Remove buttons from the toolbar
www.kevinleary.net/customizing-tinymce-wysiwyg-editor-wordpress/
5. Or add extra buttons
premium.wpmudev.org/blog/display-the-full-tinymce-editor-in-wordpress/
6. WYSIWIG post editor
codex.wordpress.org/Function_Reference/add_editor_style
7. Add more filters to Media Library
http://bit.ly/1hgqI3M
8. Create useful shortcodes
// [phone] = telephone icon
function scaffold_shortcode_phone_icon() {$phone_icon = "<i class='fa fa-phone-square fa-lg
shortcode-icon'></i> ";return $phone_icon;}
add_shortcode( 'phone', 'scaffold_shortcode_phone_icon' );
https://generatewp.com/shortcodes/
IMPROVING THE DASHBOARD
9. Hide Appearance > Editor
define( 'DISALLOW_FILE_EDIT', true );
10. Remove default widgets
paulund.co.uk/how-to-remove-default-wordpress-widgets
11. Add custom post types to At a Glance
http://bit.ly/1JKH0sn
12. Custom dashboard widgets
wpbeginner.com/wp-themes/how-to-add-custom-dashboard-widgets-in-wordpress/
13. Remove dashboard widgets
http://bit.ly/1LoBbIt
14. Add CSS to the dashboard
css-tricks.com/snippets/wordpress/apply-custom-css-to-admin-area/
add_action('admin_head', 'my_custom_fonts');
function my_custom_fonts() { echo '<style> body, td, textarea, input, select { color: pink; } </style>';}
15. Make Screen Options stand out
#screen-meta-links .show-settings { background-color: red; color: #fff;
font-weight: bold; }
PLUGINS
16. Put these code snippets in your own plugin
https://codex.wordpress.org/Writing_a_Plugin
17. Or find existing plugins
18. Highlight code syntax
wordpress.org/plugins/html-editor-syntax-highlighter/
19. Theme Customiser
Watch Dave Green's talk at #wcmcr
20. Slide not found
404