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
/** | |
* 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'; |
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> | |
<?php do_action( 'wp_body_open' ); ?> |
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
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()) |
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_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 { |
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
<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> |
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
/** | |
* 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. |
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
$('.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 |
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 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' ); |
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
$users = get_users( array( 'role' => 'author' ) ); | |
foreach ( $users as $user ) { | |
the_field( 'field_name', 'user_' . $user->ID ); | |
} |
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
# 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