This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Build the HTML --> | |
<form action="index.php" method="post"> | |
<input type="text" name="dbname"> | |
<input type="submit" value="Submit"> | |
</form> | |
<!--Use JS to prevent form resubmission on refresh/back button --> | |
<script> | |
if ( window.history.replaceState ) { | |
window.history.replaceState( null, null, window.location.href ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
# uses scotch/box from https://app.vagrantup.com/scotch/boxes/box | |
config.vm.box = "scotch/box" | |
# port-forwarding to my local only | |
config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form> | |
<div class="form-row"> | |
<div class="form-group col-md-6"> | |
<label for="inputEmail4">Email</label> | |
<input type="email" class="form-control" id="inputEmail4" placeholder="Email"> | |
</div> | |
<div class="form-group col-md-6"> | |
<label for="inputPassword4">Password</label> | |
<input type="password" class="form-control" id="inputPassword4" placeholder="Password"> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Theme Name: Your New Child Theme Name | |
Description: A child of parent theme | |
Author: Your Name | |
Author URI: http://your.website.web/ | |
Template: parent-theme-name | |
Version: n.n.n | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' ); | |
function enqueue_parent_styles() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_load_fa() { | |
wp_enqueue_style( 'my-fa', 'https://use.fontawesome.com/releases/v5.4.1/css/all.css' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'my_load_fa' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_add_google_fonts() { | |
wp_enqueue_style( 'my-google-fonts', | |
// Replace the link below with the one you get from google: | |
'http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,700,300', false ); | |
} | |
add_action( 'wp_enqueue_scripts', 'my_add_google_fonts' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Registers new home page widget | |
add_action( 'widgets_init', 'my_widgets_init' ); | |
function my_widgets_init() { | |
register_sidebar( array( | |
'name' => 'My Homepage Widget', | |
'id' => 'my-homepage-widget', | |
'before_widget' => '<div class="homepage-widget">', | |
'after_widget' => '</div>', | |
'before_title' => '<h3>', |
OlderNewer