Categories
Code Wordpress

WordPress prismjs with Child Theme

Step 1: Go to http://prismjs.com/download.html Step 2: Select your theme and languages Step 3: Download JS and CSS files (bottom of the page) Step 4: Upload files into child theme folder Step 5: Update funtions.php with the below code Step 6: Apply css <pre> and <code> class (see below examples) <pre class=”line-numbers”><code class=”language-css”>pre { border: 1px […]

Categories
Code Wordpress

WordPress Child Themes

The main reason to create a child theme is so that your edits do not get overwritten when doing any sort of updates to your main (parent) theme. The steps are fairly simple. Source: https://codex.wordpress.org/Child_Themes This example is for the Twenty Sixteen theme. Navigate into your themes folder. cd /<your_website_root_folder>/wp-content/themes/ Create a child directory within your themes folder and […]

Categories
Code Wordpress

Disable WordPress from linking images by default

Are you sick of WordPress linking images by default, making them clickable? Yeah, me too. Add the following to functions.php. The exact file location is: /wp-content/themes/<theme>/functions.php add_action(‘pre_option_image_default_link_type’, ‘always_link_images_to_none’); function always_link_images_to_none() { return ‘none’; }