Created
August 19, 2011 15:57
-
-
Save hasssan/1157167 to your computer and use it in GitHub Desktop.
Wordpress Thematic Framework snippet
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 | |
// I usually used this for developed wordpress theme at http://virtuemagz.com | |
// if don't like @import in stylesheet | |
function vmagz_create_stylesheet() { | |
$templatedir = get_bloginfo('template_directory'); | |
$stylesheetdir = get_bloginfo('stylesheet_directory'); | |
?> | |
<link rel="stylesheet" type="text/css" href="<?php echo $templatedir ?>/library/styles/reset.css" /> | |
<link rel="stylesheet" type="text/css" href="<?php echo $templatedir ?>/library/styles/typography.css" /> | |
<link rel="stylesheet" type="text/css" href="<?php echo $templatedir ?>/library/styles/images.css" /> | |
<link rel="stylesheet" type="text/css" href="<?php echo $templatedir ?>/library/layouts/2c-r-fixed.css" /> | |
<link rel="stylesheet" type="text/css" href="<?php echo $templatedir ?>/library/styles/default.css" /> | |
<link rel="stylesheet" type="text/css" href="<?php echo $templatedir ?>/library/styles/plugins.css" /> | |
<link rel="stylesheet" type="text/css" href="<?php echo $stylesheetdir ?>/style.css" /> | |
<?php | |
} | |
add_filter('thematic_create_stylesheet', 'vmagz_create_stylesheet'); | |
// change read more text | |
function vmagz_more_text() { | |
$content = 'Read More'; | |
return $content; | |
} | |
add_filter('more_text','vmagz_more_text'); | |
// custom postmeta | |
function custom_postmeta($postmeta){ | |
$postmeta = '<div class="entry-meta">'; | |
$postmeta .= 'Dipublikasikan '; | |
$postmeta .= '<span class="entry-date"><abbr class="published" title="'; | |
$postmeta .= get_the_time(thematic_time_title()) . '">'; | |
$postmeta .= get_the_time(thematic_time_display()); | |
$postmeta .= '</abbr></span>'; | |
$postmeta .= " di " . get_the_category_list(', '); | |
$postmeta .= "</div><!-- .entry-meta -->\n"; | |
return $postmeta; | |
} | |
add_filter('thematic_postheader_postmeta', 'custom_postmeta'); | |
// add support for Wordpress 3.x custom menu | |
add_theme_support( 'nav-menus' ); | |
// remove title | |
function vmagz_remove_blogtitle() { | |
remove_action('thematic_header','thematic_blogtitle',3); | |
} | |
add_action('init','vmagz_remove_blogtitle'); | |
// remove blogdescription | |
function vmagz_remove_blogdescription() { | |
remove_action('thematic_header','thematic_blogdescription',5); | |
} | |
add_action('init', 'vmagz_remove_blogdescription'); | |
// remove add logo image to header | |
function vmagz_logo_image() { | |
echo '<div id="logo-image"><a href="'.get_option('home').'"><img src="'.get_bloginfo('stylesheet_directory').'/images/logo.png" /></a></div>'; | |
} | |
add_action('thematic_header','vmagz_logo_image',4); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment