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 | |
/* | |
* Disable Gutenberg globally | |
* use this if you prefer one-liner | |
* add_filter('use_block_editor_for_post', '__return_false'); | |
*/ | |
function _thz_filter_disable_block_editor(){ | |
return false; | |
} | |
add_filter( 'use_block_editor_for_post', '_thz_filter_disable_block_editor' ); |
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
//Just a random file for loading your posts to see that the infinite scroll works. | |
<?php get_header(); ?> | |
<div class="col-md-6 col-md-offset-3"> | |
<div class="post-container"> | |
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
<div class="page-header post"> | |
<h1><?php the_title(); ?></h1> | |
<p><?php the_excerpt(); ?></p> | |
</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
<?php echo file_get_contents( get_stylesheet_directory_uri() . '/img/icons/your-logo-file.svg' ); ?> |
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 | |
/* JUST ADD THIS CODE TO YOUR THEMES functions.php */ | |
/* Customize the last half, the output half to suit your projects needs */ | |
add_filter('post_gallery', 'my_post_gallery', 10, 2); | |
function my_post_gallery($output, $attr) { | |
global $post; | |
if (isset($attr['orderby'])) { | |
$attr['orderby'] = sanitize_sql_orderby($attr['orderby']); |
- Git: http://git-scm.com/downloads
- Related Tutorial: https://help.github.com/articles/set-up-git
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
// _decimal.scss | MIT License | gist.github.com/terkel/4373420 | |
// Round a number to specified digits. | |
// | |
// @param {Number} $number A number to round | |
// @param {Number} [$digits:0] Digits to output | |
// @param {String} [$mode:round] (round|ceil|floor) How to round a number | |
// @return {Number} A rounded number | |
// @example | |
// decimal-round(0.333) => 0 |