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
<?php | |
/* Template Name: Redirect */ | |
?> | |
<?php | |
$args = array('child_of'=>get_the_ID(), 'sort_column'=>'menu_order', 'sort_order'=>'ASC'); | |
$pages = get_pages($args); | |
$first_child = $pages[0]->ID; | |
$link = get_permalink($first_child); | |
?> |
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
<IfModule mod_rewrite.c> | |
RewriteRule . - [E=rwbase:/] | |
RewriteCond %{HTTP_HOST} localhost$ | |
RewriteRule . - [E=rwbase:plausiblethought/] | |
RewriteCond %{HTTP_HOST} staging.plausiblethought.co.uk$ | |
RewriteRule . - [E=rwbase:plausiblethought/] | |
RewriteEngine On | |
RewriteBase /%{ENV:rwbase} | |
RewriteRule ^index\.php$ - [L] |
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
# cd to blog folder | |
cd ~/Sites/plausiblethought/content/blog/ | |
# count files | |
COUNT=$(ls | wc -l) | |
# make folder (e.g. 10-test) | |
mkdir $COUNT-{query} | |
# cd to folder created above |
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
Testing Slogger |
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
# Easier navigation | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
# Shortcuts | |
alias brewup='brew update && brew upgrade && brew cleanup && brew doctor' | |
alias ping='ping -c 1' | |
alias ls='ls -lA' | |
alias d='cd ~/Dropbox' |
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
<?php | |
function shortcodeButton( $atts, $content = null ) { | |
return '<a href="' . get_bloginfo('url') . '/contact/" class="btn">' . $content .' </a>'; | |
} | |
add_shortcode('button', 'shortcodeButton'); |
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
<?php | |
function shortcodeButton( $atts, $content = null ) { | |
extract( shortcode_atts( array( | |
'link' => 'contact/', | |
'colour' => 'green' | |
), $atts ) ); | |
return '<a href="' . "{$link}" . '" class="btn btn-' . "{$colour}" . '">' . $content . ' </a>'; | |
} |
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
<div class="grid container"> | |
<div class="unit half">.unit.half</div> | |
<div class="unit half">.unit.half</div> | |
<div class="unit one-third">.unit.one-third</div> | |
<div class="unit one-third">.unit.one-third</div> | |
<div class="unit one-third">.unit.one-third</div> | |
<div class="unit one-quarter">.unit.one-quarter</div> | |
<div class="unit one-quarter">.unit.one-quarter</div> | |
<div class="unit one-quarter">.unit.one-quarter</div> | |
<div class="unit one-quarter">.unit.one-quarter</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
# ignore everything in this directory | |
/* | |
# but not these | |
!.gitignore | |
!assets/ | |
!core/ | |
!_SASS/ | |
!_JS/ |
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
# Thanks to: https://gist.github.com/jdbartlett/444295 | |
# Ignore everything in the root except the "wp-content" directory. | |
/* | |
!.gitignore | |
!wp-content/ | |
# Ignore everything in the "wp-content" directory, except the "plugins" and "themes" directories. | |
wp-content/* | |
!wp-content/plugins/ |
OlderNewer