This file contains hidden or 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
{% for k,v in bag('career.quotes').iteritems() %} | |
<div id="{{ k }}"> | |
<div class="quote"> | |
<h3>"{{ v.quote }}"</h3> | |
<p><em>{{ v.name }}, {{ v.title }}</em></p> | |
</div> | |
</div> | |
{% endfor %} |
This file contains hidden or 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
[fields.body] | |
label = Body | |
type = markdown |
This file contains hidden or 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 Shortcode to your functions.php | |
function gist_shortcode( $atts ) { | |
// Attributes | |
$atts = shortcode_atts( | |
array( | |
'name' => 'jonathanfann', | |
'slug' => 'ae707752f2f2c3f93e739838f8dce5c0', | |
), |
This file contains hidden or 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 | |
$post_type = get_post_type( get_the_ID() ); | |
get_template_part( 'headers/' . $post_type, 'header' ); | |
?> | |
<!-- | |
if your custom post type label is named 'support' for example | |
this will include the contents of 'yourtheme/headers/support-header.php' | |
Note: Fails silently so if file doesn't exist, nothing will be included. | |
--> |
This file contains hidden or 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
body:after { | |
position:fixed; | |
top:0; | |
bottom:0; | |
right:0; | |
left:0; | |
padding-top:20%; | |
text-align:center; | |
background:rgba(0,0,0,0.8); | |
content: 'it worked!'; |
This file contains hidden or 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 | |
/* | |
add this to your functions.php | |
replace 'mytax' with your custom taxonomy | |
replace 'mypost' with your custom post type | |
*/ | |
/* 1. add mytax to mypost */ | |
function set_custom_columns($columns) { | |
$columns['mytax'] = __( 'My Tax Name', 'your_text_domain' ); |
This file contains hidden or 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
$maincssupdate = filemtime($path . 'wp-content/themes/your_theme/static/gen/main.css'); | |
wp_enqueue_style( 'your_theme_custom', get_template_directory_uri() . '/static/gen/main.css', array(), $maincssupdate, 'all'); |
This file contains hidden or 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 // TODO: put this in your functions.php file and use on a page like [pdf]/path-to-your/file.pdf[/pdf] ?> | |
<?php | |
function pdf_embed_shortcode($attrs, $content) { | |
$pdfPath = $content; | |
if ( wp_is_mobile() ) { | |
$htmlStuff = | |
'<div style="text-align:center;"><p id="mobilefallback">This browser does not support native PDF embeds or you are on a mobile device. Please <a href="' . $pdfPath . '" target="_blank">download</a> the PDF instead.</p> | |
<p class="pdfDownload"><a class="btn btn-primary btn-md" href="' . $pdfPath . '" target="_blank">Download</a></p></div>'; |
This file contains hidden or 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
var dang = new SpeechSynthesisUtterance(window.location.hostname + ' is garbage and we truly apologize.'); dang.lang = 'en-US'; window.speechSynthesis.speak(dang); |
OlderNewer