Creating WordPress child themes and preventing automatic linebreaks in pre-tags
I wanted to prevent automatic linebreaks in pre-tags in the “Twenty Fourteen” theme. I followed WordPress’ description on how to create child themes.
- In the
/usr/local/www/wordpress/wp-content/themesdirectory, I created thetwentyfourteen_localdirectory. - In this directory I created the
style.cssfile. - The file was given the contents shown below.
- In the Dashboard, I clicked on
- Appearance.
- Themes.
- The Activate button for the Twenty Fourteen Local theme.
- That’s it.
- In my case I performed one additional step, committing the new file to the SCM system I use for my configuration files.
/*
Theme Name: Twenty Fourteen Local
Theme URI: http://wordpress.org/themes/twentyfourteen
Description: Twenty Fourteen Local Child Theme
Author: the WordPress team and Ximalas
Author URI: http://wordpress.org/
Template: twentyfourteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: black, green, white, light, dark, two-columns, three-columns, left-sidebar, right-sidebar, fixed-layout, responsive-layout, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, full-width-te
Text Domain: twentyfourteen
*/
@import url("../twentyfourteen/style.css");
pre {
white-space: pre;
word-break: normal;
word-wrap: normal;
}