summaryrefslogtreecommitdiff
path: root/wordpress
diff options
context:
space:
mode:
Diffstat (limited to 'wordpress')
-rw-r--r--wordpress/functions.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/wordpress/functions.php b/wordpress/functions.php
index 464d9a3..ff849a2 100644
--- a/wordpress/functions.php
+++ b/wordpress/functions.php
@@ -9,6 +9,7 @@ function movejquerytofooter(){
wp_enqueue_script('jquery');
}
}
+add_action( 'init', 'movejquerytofooter');
// Disable W3TC footer comment for everyone but Admins (single site & network mode)
if ( !current_user_can( 'activate_plugins' ) ) {
@@ -22,3 +23,12 @@ function var_piwik() {
wp_enqueue_script('piwik');
}
}
+add_action( 'init', 'var_piwik');
+
+// Add "Read more" button to custom excerpts
+function custom_excerpt($text) {
+ $text = preg_replace('/<\/p>$/', '', $text );
+ $excerpt = $text . '<br><a class="read-more-button" href="'. esc_url( get_permalink() ).'">' . __( 'Read more', 'papercuts' ) . '</a></p>';
+ return $excerpt;
+}
+add_filter('the_excerpt', 'custom_excerpt');