'sidebar',
'before_widget' => '
',
'after_widget' => '',
'before_title' => '',
));
/* =MENUS SUPPORT
********************************/
if ( function_exists( 'wp_nav_menu' ) ){
if (function_exists('add_theme_support')) {
add_theme_support('nav-menus');
add_action( 'init', 'register_my_menus' );
function register_my_menus() {
register_nav_menus(
array(
'primary-menu' => 'Primary Menu'
)
);
}
}
}
add_image_size('home-thumb','590','330',true);
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 100, 100, true );
function home_excerpt_length($length) {
return 25;
}
add_filter('excerpt_length', 'home_excerpt_length');
if ( ! isset( $content_width ) ) $content_width = 720;
function trim_excerpt($text) {
return rtrim($text,'[...]');
}
add_filter('get_the_excerpt', 'trim_excerpt');
add_action( 'wp_print_styles', 'my_deregister_styles', 100 );
function my_deregister_styles() {
wp_deregister_style( 'wp-pagenavi' );
}
// Get the id of a page by its name
function get_page_id($page_name){
global $wpdb;
$page_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_name = '".$page_name."'");
return $page_id;
}
function autoshow_list_comments( $comment, $args, $depth )
{
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case '' :
?>
id="li-comment-">
No Category.
Dashboard->Appearance->Footer.');
add_custom_image_footer();
add_filter('wp_nav_menu_items', 'autoshow_add_home_image_to_main_menu', 10, 2);
}
function autoshow_add_home_image_to_main_menu($items, $args)
{
if( $args->theme_location == 'primary-menu' )
$items = '
' . $items;
return $items;
}
/*
* CUSTOM FRONT PAGE MENU
*/
add_settings_field( 'custom_frontpage', '', 'autoshow_frontpage_function', 'reading', 'default' );
register_setting( 'reading', 'custom_frontpage');
function autoshow_frontpage_function()
{?>
comment_status) : ?>
%s ' ); ?>
You must be logged in to post a comment.
Auto Show Options
3 )
{
echo ' | Category: ';
$dropdown_cats = '';
echo $dropdown_cats;
echo '
';
}
else
{
echo ' | Category: ';
the_category( ', ' );
echo '
';
}
}
function autoshow_the_tags()
{
$tags = get_the_tags();
if( ! empty( $tags ) )
{
$dropdown_tags = "";
if( count( $tags ) > 2 )
{
print ' | Tags: ';
print $dropdown_tags;
print '
';
}
else
{
print ' | Tags: ';
the_tags( '' ,', ' );
print '
';
}
}
}
/**
* Copied from Twenty Ten Theme and modified
*/
if ( ! function_exists( 'posted_in' ) ) :
function posted_in() {
$tag_list = get_the_tag_list( '', ', ' );
if ( $tag_list ) {
$posted_in = 'This entry was posted in %1$s and tagged %2$s. Bookmark the permalink.';
} elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
$posted_in = 'This entry was posted in %1$s. Bookmark the permalink.';
} else {
$posted_in = 'Bookmark the permalink.';
}
printf(
$posted_in,
get_the_category_list( ', ' ),
$tag_list,
get_permalink(),
the_title_attribute( 'echo=0' )
);
}
endif;
function autoshow_check_if_home()
{
return !( is_category() || is_month() || is_day() || is_author() || is_tag() || is_tax() || is_archive() || is_search() || is_404() || is_single() || is_attachment() || is_page() );
}
?>