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
/** | |
* SETTINGS | |
* Also included: ".sr-only" for visually hiding content while keeping it accessible to screen readers | |
*/ | |
:root { | |
--max-paragraph-width: 65ch; | |
--anchor-scroll-margin: 5ex; | |
--min-textarea-height: 10em; | |
--focus-outline-color: #4d90fe; | |
--focus-outline-width: 2px; |
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
<!-- This is how you get a comma-separated list of items in Vue.js 2.0, | |
without a comma at the end of the last item --> | |
<p v-for="(item, index) in items"> | |
{{author}}<span v-if="index != (items.length - 1)">,</span> | |
</p> |
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_filter('body_class','add_category_to_single'); | |
function add_category_to_single($classes) { | |
if (!is_admin() && is_single() ) { | |
global $post; | |
foreach((get_the_category($post->ID)) as $category) { | |
// add category slug to the $classes array | |
$classes[] = $category->taxonomy . '-' . $category->slug; | |
} | |
} | |
// return the $classes array |
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 | |
/* | |
Plugin Name: Functionality plugin for [Name of your site] | |
Plugin URI: http://unaiyecora.com/writings/how-to-make-a-functionality-plugin-instead-of-using-functions-php/ | |
Description: Move most of your functions outside of functions.php | |
Author: Unai Yécora | |
Version: 1.0 | |
Author URI: http://www.unaiyecora.com/ | |
License: GPL2 | |
*/ |
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 | |
function jeherve_custom_infinite_more() { | |
if ( is_home() || is_archive() || is_search() ) { | |
?> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
infiniteScroll.settings.text = "Custom Text"; | |
//]]> | |
</script> |