This sheet goes along with this SSH YouTube tutorial
$ ssh [email protected]
$ mkdir test
$ cd test
<!-- Add before endwhile in single.php or as a plugin --> | |
<aside class="bgcolor4"> | |
<div class="container"> | |
<h3 class="custom-title"><?php esc_html_e('Similar articles you may like... ', 'tower') ?></h3> | |
<div class="row"> | |
<?php | |
$cats = wp_get_post_categories( get_the_ID(), ['fields'=>'ids',]); | |
$relatedPosts = get_posts( |
<!-- Add to a plugin or in front-page.php for a custom theme --> | |
<aside class="bgcolor4"> | |
<div class="container"> | |
<h3 class="custom-title"><?php esc_html_e('Latest Articles ', 'tower') ?></h3> | |
<div class="row"> | |
<?php | |
$query = new WP_Query( [ | |
'post__not_in' => get_option( 'sticky_posts'), | |
'post_type' => 'post', |
$ ssh [email protected]
$ mkdir test
$ cd test
// Function to sort words then strip out repeats | |
// Used to get unique keywords from different web languages/tools I've used to get ideas for blog posts. I tend to have a lot of repeats... | |
const commaSeparated = "split, sort, and, filter, strings, separated, by, commas, with, no, repeats, repeats, repeats"; | |
const spaceSeparated = "split sort and filter strings separated by spaces with no repeats repeats repeats"; | |
let commaWords = []; | |
let spaceWords = []; | |
function splitStrings(str, separator, output) { |
const blogTitle = "How to create a GitHub Gist"; | |
const urlSlug = blogTitle.toLowerCase().split(" ").filter(word => word !== "").join("-"); |
Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:
Up Arrow
: Will show your last commandDown Arrow
: Will show your next commandTab
: Will auto-complete your commandCtrl + L
: Will clear the screen