Skip to content

Instantly share code, notes, and snippets.

View AmeliaBriscoe's full-sized avatar

Amelia Briscoe AmeliaBriscoe

View GitHub Profile
@AmeliaBriscoe
AmeliaBriscoe / custom.js
Created August 21, 2012 17:33
HTML5 Basic Template with style sheet, javascript/jQuery file and responsive stylesheet
$(document).ready(function() {
$("body").css("display", "none");
$("body").fadeIn(1000);
});
@AmeliaBriscoe
AmeliaBriscoe / functions.php
Created August 21, 2012 18:01
Thesis Child Theme Template
<?php
if (! defined('ABSPATH'))
die('Please do not directly access this file');
include_once(TEMPLATEPATH . '/functions.php');
class ten0nine_child_theme extends thesis_custom_loop {
public function __construct() {
// run the parent constructor so we can access the thesis custom loop api
@AmeliaBriscoe
AmeliaBriscoe / feature_box.php
Created August 21, 2012 18:14
Thesis Feature Box
/*
* This file adds a feature box of social share icons to the Thesis Theme.
* The code compliments my personal Facebook Open Graph Tags Plugin
* The Google+ and pinterest javascript needs to be inserted into the Thesis Design Options prior
*/
function get_featured_social_share() {
//choose which pages the social share buttons will feature on
if (!is_front_page() && !is_page(array('contact','about')) && !is_404()){
global $post;
@AmeliaBriscoe
AmeliaBriscoe / comment_intro_text_function
Created December 11, 2013 23:03
Customize the Thesis 2.1 Comment Intro Title Text
/* Customize the comment intro text */
function comment_intro_replace($text) {
return $text='Don\'t be shy, <a href="#commentform">add one of your own</a>';
}
add_filter('thesis_comments_intro','comment_intro_replace');
@AmeliaBriscoe
AmeliaBriscoe / comment_intro_text_count
Created December 11, 2013 23:04
Customize the Thesis 2.1 Comment Intro Text and use the count feature.
/* Customise the comment intro if there were comments or not */
function comment_intro_replace($text) {
global $wp_query;
$number = (int) count($wp_query->comments_by_type['comment']);
if ($number == 0)
$text = '';
return $text;
}
add_filter('thesis_comments_intro','comment_intro_replace');
@AmeliaBriscoe
AmeliaBriscoe / closed_comment_text_filter
Created December 11, 2013 23:06
Edit the 'comments for this page are closed' text so that it doesn't appear
/* Edit the closed comments message */
function no_closed_msg($text) {
return $text='';
}
add_filter('thesis_comments_intro_closed','no_closed_msg');
@AmeliaBriscoe
AmeliaBriscoe / thesis_readmore
Last active January 3, 2016 13:39
Thesis Custom Read More Link Text
function custom_excerpt_read_more_link() { ?>
<div class="custom-read-more"><a href="<?php the_permalink(); ?>"> Read More...</a></div>
<?php }
add_action ('thesis_hook_post_box_thesis_post_bottom' , 'custom_excerpt_read_more_link');
add_filter('widget_posts_args', 'widget_posts_args_add_custom_type');
function widget_posts_args_add_custom_type($params) {
$params['tax_query'] = array(
array(
'taxonomy' => 'thesis_content',
'field' => 'slug',
'terms' => array( 'classic-skin', 'pearsonified-skin' )
)
/*,
array(
@AmeliaBriscoe
AmeliaBriscoe / Recent Custom Post Type
Last active August 29, 2015 14:01
Recent Posts Widget Custom Post Type
add_filter('widget_posts_args', 'widget_posts_args_add_custom_type');
function widget_posts_args_add_custom_type($params) {
$params['post_type'] = array('post', 'custom_post');
return $params;
}
@AmeliaBriscoe
AmeliaBriscoe / Thesis Sidebar Recent Posts
Created May 27, 2014 03:17
Display recent posts, with thumbnails, in the Thesis Classic Sidebar
/* Recent Posts With Thumbnails in Sidebar */
function recent_posts_thumb() {
global $post;
$thumbnails = get_posts('numberposts=5');
echo '<div class="recent-posts">';
echo '<p class="widget_title">Recent Posts</p>';
echo '<ul>';
foreach ($thumbnails as $thumbnail) {
if ( has_post_thumbnail($thumbnail->ID)) {
echo '<li>';