02-27-2011, 07:21 PM
|
|
|
aliasx
Join Date: Apr 2001
Posts: 19,010
|
Here it is:
Quote:
<?php
include 'theme_options.php';
include 'guide.php';
/* ADD SIDEBARS */
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Sidebar',
'before_widget' => '<li id="%1$s" class="sidebox %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="sidetitl">',
'after_title' => '</h3>',
));
register_sidebar(array(
'name' => 'Footer',
'before_widget' => '<li id="%1$s" class="botwid %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="bothead">',
'after_title' => '</h3>',
));
/* ADD CUSTOM MENUS */
register_nav_menus( array(
'primary' => __( 'Primary Navigation', '' ),
) );
function fallbackmenu(){ ?>
<div id="catmenu">
<ul><li> Go to Adminpanel > Appearance > Menus to create your menu. You should have WP 3.0+ version for custom menus to work.</li></ul>
</div>
<?php }
/* CUSTOM EXCERPTS */
function new_excerpt_length($length) {
return 50;
}
add_filter('excerpt_length', 'new_excerpt_length');
function new_excerpt_more($more) {
return '<a href="'. get_permalink($post->ID) . '">' . ' [ Read More ]' . '</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');
/* ADD PAGE NAVIGATION */
function getpagenavi(){
?>
<div id="navigation">
<?php if(function_exists('wp_pagenavi')) : ?>
<?php wp_pagenavi() ?>
<?php else : ?>
<div class="alignleft"><?php next_posts_link(__('« Older Entries','arclite')) ?></div>
<div class="alignright"><?php previous_posts_link(__('Newer Entries »','arclite')) ?></div>
<div class="clear"></div>
<?php endif; ?>
</div>
<?php
}
/* ADD FEATURED THUMBNAIL */
if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9
add_theme_support( 'post-thumbnails' );
}
/* GET THUMBNAIL URL */
function get_image_url(){
$image_id = get_post_thumbnail_id();
$image_url = wp_get_attachment_image_src($image_id,'large');
$image_url = $image_url[0];
echo $image_url;
}
?>
|
|
|
|