Snippets

Joseph Dickson Scratch JD 1.0.0

Updated by Joseph Dickson

File functions.php Modified

  • Ignore whitespace
  • Hide word diff
 <?php
-if ( ! function_exists( 'scratch_jd_setup' ) ) { 
-
 /**
- *	Above: Check if scratch_jd_setup exists before running
- *
- *	Below: Sets up theme defaults and registers support for WordPress features
- *
- * 	It is important to set up these functions before the init hook so that none of these features are lost.
- *
  *	@since Scratch JD 1.0.0
+ *
+ * 	Proper way to enqueue scripts and styles
  */
 
+function scratch_jd_scripts() {
 
-	function scratch_jd_setup() {
-
-	/**
-	 * 	Proper way to enqueue scripts and styles
-	 */
-
-		function scratch_jd_scripts() {
-		
-			wp_enqueue_style( 'scratch', get_stylesheet_uri() );
-			
-		}
-
-	add_action( 'wp_enqueue_scripts', 'scratch_jd_scripts' );
-
-	}
+	wp_enqueue_style( 'scratch-jd', get_stylesheet_uri() );
 }
+
+add_action( 'wp_enqueue_scripts', 'scratch_jd_scripts' );

File scratch-jd.zip Modified

  • Ignore whitespace
  • Hide word diff
Binary file modified.
Updated by Joseph Dickson

File scratch-jd.zip Added

  • Ignore whitespace
  • Hide word diff
Binary file added.
Created by Joseph Dickson

File footer.php Added

  • Ignore whitespace
  • Hide word diff
+<?php
+/**
+ * The template for displaying the footer
+ *
+ * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
+ *
+ * @since Scratch JD 1.0.0
+ */
+wp_footer();

File functions.php Added

  • Ignore whitespace
  • Hide word diff
+<?php
+if ( ! function_exists( 'scratch_jd_setup' ) ) { 
+
+/**
+ *	Above: Check if scratch_jd_setup exists before running
+ *
+ *	Below: Sets up theme defaults and registers support for WordPress features
+ *
+ * 	It is important to set up these functions before the init hook so that none of these features are lost.
+ *
+ *	@since Scratch JD 1.0.0
+ */
+
+
+	function scratch_jd_setup() {
+
+	/**
+	 * 	Proper way to enqueue scripts and styles
+	 */
+
+		function scratch_jd_scripts() {
+		
+			wp_enqueue_style( 'scratch', get_stylesheet_uri() );
+			
+		}
+
+	add_action( 'wp_enqueue_scripts', 'scratch_jd_scripts' );
+
+	}
+}

File header.php Added

  • Ignore whitespace
  • Hide word diff
+<?php
+/**
+ * The template for displaying the header
+ *
+ * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
+ *
+ * @since Scratch JD 1.0.0
+ */
+wp_head();

File index.php Added

  • Ignore whitespace
  • Hide word diff
+<?php
+// Get the Footer
+get_header();
+
+// The Loop
+if ( have_posts() ) {
+        while ( have_posts() ) {
+                the_post(); 
+
+                // Display the post title and HTML              
+                the_title();
+                
+                // Display post content
+                the_content();
+                
+        } // end while
+} // end if
+
+// Get the Footer
+get_footer();

File style.css Added

  • Ignore whitespace
  • Hide word diff
+/*
+	Theme Name:	Scratch JD
+	Theme URI:	https://joseph-dickson.com/scratch-jd
+	Author:	Joseph Dickson
+	Author URI:	https://joseph-dickson.com
+	Description:	Scratch is a no thrills theme.
+	Version:	1.0.0
+	License:	GNU General Public License v3
+	License URI:	https://www.gnu.org/licenses/gpl-3.0.en.html
+	Text Domain:	scratch-jd
+*/
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.