View functions.php
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
/** | |
* Adjust the reading time postfix. | |
*/ | |
function my_custom_reading_time( $postfix, $time, $singular, $multiple ) { | |
if ( $time == 1 ) { | |
$postfix = 'minuta'; | |
} elseif ( $time == 2 || $time == 3 || $time == 4 ) { | |
$postfix = 'minuty'; | |
} else { | |
$postfix = 'minut'; |
View gist:835294f0152b592083103c1c05aadf39
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
<body> | |
<?php do_action( 'wp_body_open' ); ?> |
View gulpfile.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
const { src, dest, watch } = require('gulp'); | |
const sass = require('gulp-sass'); | |
const minifyCSS = require('gulp-csso'); | |
const babel = require('gulp-babel'); | |
const concat = require('gulp-concat'); | |
const browserSync = require('browser-sync').create(); | |
function css() { | |
return src('./sass/*.scss', { sourcemaps: true }) | |
.pipe(sass()) |
View gist:97e3b699d48982051952f5c37af88fde
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
add_action( 'the_post', 'remove_reading_time_by_id' ); | |
function remove_reading_time_by_id( $post_object ) { | |
$post_ids = array( | |
'53', | |
'10', | |
); | |
global $reading_time_wp; | |
if ( in_array( $post_object->ID, $post_ids ) ) { | |
remove_filter( 'the_content', array( $reading_time_wp, 'rt_add_reading_time_before_content') ); | |
} else { |
View gist:372f4542d50625efde1e225b41e1a602
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
<a class="fancybox-form" href="#contact-jess">Email Jess</a> | |
<div id="contact-jess" style="display: none;">[gravityform id="5" title="true" description="true" ajax="true"]</div> |
View functions.php
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
/** | |
* A Function to remove the auto generated Reading Time from Yoast og:desc | |
* | |
* This hooks into Yoast's `wpseo_opengraph_desc` filter and uses a regular | |
* expression to remove the reading time for the post | |
* | |
* @see Reading Time WP Plugin | |
* @link https://wordpress.org/plugins/reading-time-wp/ | |
* | |
* @param string $ogdesc The excerpt grabbed by Yoast for output. |
View gist:466f214819899e0f7087de29b2927d70
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
$('.gfield select').each(function(e) { | |
// Hide the select element | |
$(this).css('display', 'none'); | |
// clone the select element | |
clone = $(this).clone(); | |
// append the cloned select after the first select | |
$(this).after(clone); | |
// store the original select ID | |
var selectID = $(this).attr('id'); | |
// Call ddslick on the cloned select |
View functions.php
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 reading_time_remove_front_page() { | |
if ( ! is_singular() ) { | |
global $readingTimeWP; | |
remove_filter('the_content', array($readingTimeWP, 'rt_add_reading_time_before_content')); | |
} | |
} | |
add_action( 'wp', 'reading_time_remove_front_page' ); |
View gist:8c82d0d92764d3652ff055b345767dcf
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
$users = get_users( array( 'role' => 'author' ) ); | |
foreach ( $users as $user ) { | |
the_field( 'field_name', 'user_' . $user->ID ); | |
} |
View Expire Headers
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
# Fonts | |
# Add correct content-type for fonts | |
AddType application/x-font-ttf .ttf | |
## LEVERAGE BROWSER CACHING ## | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType application/x-font-ttf "access 1 week" | |
ExpiresByType image/jpg "access 1 week" | |
ExpiresByType image/jpeg "access 1 week" |
NewerOlder