Skip to content

Instantly share code, notes, and snippets.

@kingsidharth
Created March 27, 2012 09:43
Show Gist options
  • Save kingsidharth/2214431 to your computer and use it in GitHub Desktop.
Save kingsidharth/2214431 to your computer and use it in GitHub Desktop.
For kingsidharth.com
.custom .page {
background: none;
font-family: Helvetica Neue, Helvetica, Lucida Grande, Lucida Sans, Verdana, sans-serif; }
.custom {
background: url("images/background-noise.png") top center repeat; }
#header_area {
background: url("images/top-border-background.png") top center repeat-x; }
#header_area #header {
padding: 0;
text-align: center; }
#header_area #header #logo a {
background: url("images/logo.png") no-repeat;
width: 390px;
height: 125px;
border: none;
display: inline-block;
text-indent: -9999px;
margin-top: 5px;
margin-left: 100px; }
#multimedia_box {
position: relative;
background: none;
padding: 0; }
#multimedia_box #image_box {
background: none; }
#multimedia_box #image_box img {
position: relative;
background: none;
border: none!important;
top: -126px; }
#sidebars {
position: relative; }
#sidebars ul.menu {
position: absolute;
right: 21px;
top: 20px;
border: none;
width: 35%;
background: rgba(0, 0, 0, 0.7);
text-align: right; }
#sidebars ul.menu li {
display: list-item;
float: none; }
#sidebars ul.menu li a {
text-transform: none;
font-size: 14px;
background: none;
border: none;
color: #ebebeb; }
#sidebars ul.menu li a:hover {
background: none;
letter-spacing: 1px;
color: #fafafa;
font-weight: bold; }
#sidebars ul.menu .current_page_item a, #sidebars ul.menu .current_page_parent a {
font-weight: bold;
letter-spacing: 0px; }
#sidebars ul.menu .current_page_item a:before, #sidebars ul.menu .current_page_parent a:before {
content: '*'; }
#sidebars ul.menu .current_page_item a:hover, #sidebars ul.menu .current_page_parent a:hover {
letter-spacing: 0; }
#footer_area #footer {
text-align: left; }
#footer_area #footer a {
border-bottom: 1px dotted #ebebeb; }
#footer_area #footer a:hover {
color: #ebebeb;
background: none;
border-bottom: 1px solid #ebebeb; }
.teasers_box {
padding-top: 0; }
.teasers_box .teaser {
width: 100%;
padding-bottom: 1.4em; }
.teasers_box .teaser_right {
padding-top: 1em;
padding-bottom: none!important; }
.teasers_box .entry-title a {
font-size: 18px;
color: #ebebeb;
text-shadow: 0 -1px 0 #252525; }
.teasers_box .entry-title a:hover {
color: #fafafa;
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
.teasers_box .teaser_category {
border: none;
text-decoration: none;
font-family: Helvetica Neue, Helvetica, Lucida Grande, Lucida Sans, Verdana, sans-serif;
background: #ebebeb;
display: inline-block;
color: #555555;
padding: 0 0.4em; }
.teasers_box .teaser_category:hover {
background: #fafafa;
color: #252525; }
.teasers_box .title {
color: #252525;
font-size: 30px;
text-shadow: 0 1px 0 #636363; }
.headline_area h1.entry-title {
font-size: 22px;
text-shadow: 0 1px 0 #636363; }
.headline_area .headline_meta {
text-shadow: 0 -1px 0 #252525;
border: none; }
.headline_area .headline_meta a {
border: none; }
.headline_area .headline_meta a:hover {
background: none;
color: #ebebeb;
text-decoration: none; }
h1, h2, h3, h4, h5, h6 {
text-shadow: 0 1px 0 #636363; }
blockquote p {
font-family: Droid Serif, Georgia, serif;
font-style: italic;
color: #b8b8b8;
text-shadow: 0 -1px 0 #252525; }
.format_text a {
color: #fafafa;
text-decoration: none!important;
border-bottom: 1px dotted #ebebeb; }
.format_text a:hover {
background: #ebebeb;
color: #3b3b3b; }
<?php
/* INDEX
* 1. Navigation
* 2. Remove Attribution
* 3. Custom Post Types
* 4. Filters
* 5. Footer
*/
// 1. Navigation
remove_action('thesis_hook_before_header', 'thesis_nav_menu');
if(is_home()){ add_action('thesis_hook_after_content', 'thesis_nav_menu'); }
else{ add_action('thesis_hook_before_sidebars', 'thesis_nav_menu') ;}
// 2. Remove Attribution
remove_action('thesis_hook_footer', 'thesis_attribution');
// 3. Custom Post Types
//Poetry
add_action( 'init', 'my_custom_init' );
function my_custom_init() {
$args = array(
'label' => __('Poems'),
'singular_label' => __('Poem'),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'supports' => array( 'title', 'editor', 'author', 'custom-fields', 'excerpt', 'comments' )
);
register_post_type( 'poem', $args );
}
add_action('admin_menu','my_admin_menu');
function my_admin_menu(){
$post_options = new thesis_post_options;
$post_options->meta_boxes();
foreach ($post_options->meta_boxes as $meta_name => $meta_box) {
add_meta_box($meta_box['id'], $meta_box['title'], array('thesis_post_options', 'output_' . $meta_name . '_box'), 'poem', 'normal', 'high'); #wp
}
add_action('save_post', array('thesis_post_options', 'save_meta')); #wp
}
//4. Filters
function my_doctype() { //doctype HTML5
return '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
}
add_filter('thesis_doctype','my_doctype');
function custom_search_text($field_value) { //search field text
$field_value = 'Search...';
return $field_value;
}
add_filter('thesis_search_form_value', 'custom_search_text');
//prev-next text
function previous_text(){
$previous = '&larr; Older Thoughts';
return $previous;
}
add_filter('thesis_previous','previous_text');
function next_text(){
$next = 'Newer Thoughts &rarr;';
return $next;
}
add_filter('thesis_next','next_text');
// 5. Footer
function custom_footer() { ?>
<p>Site on <a href="http://www.wordpress.org">WordPress</a> with <a href="http://www.kingsidharth.com/thesis">Thesis Theme Framework</a>.</p>
<p>Copyright &#169; 2008 - <?php echo date("Y") ?> King Sidharth. All Rights Reserved.</p>
<?php }
add_action('thesis_hook_footer', 'custom_footer');
// 6. Sticky JQuery
function stick_jquery() {?>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo get_bloginfo('template_url'); ?>/custom/scripts/Sticky/jquery.sticky.js"></script>
<script>
$(document).ready(function(){
$("#multimedia_box").sticky({topSpacing:100});
});
</script>
<?php }
// add_action('wp_head', 'stick_jquery');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment