'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');
function theme_queue_js(){
if (!is_admin()){
if (!is_page() AND is_singular() AND comments_open() AND (get_option('thread_comments') == 1)) {
wp_enqueue_script( 'comment-reply' );
}
}
}
add_action('get_header', 'theme_queue_js');
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 custom_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', 'add_home_image', 10, 2);
function add_home_image($items, $args)
{
if( $args->theme_location == 'primary-menu' )
$items = '
' . $items;
return $items;
}
}
function my_comment_form($post, $user_ID, $user_identity) {
if ('open' == $post->comment_status) : ?>
%s ' ); ?>
You must be logged in to post a comment.
Auto Show Options
3)
{
$cats_string = '';
$current_key = 0;
foreach ($categories as $cat)
{
if($current_key == count($categories)-1)
$cats_string .= $cat->cat_ID;
else
$cats_string .= $cat->cat_ID . ',';
$current_key++;
}
echo ' | Category: ';
wp_dropdown_categories(array('include' => $cats_string, 'id' => 'cat_from_' . get_the_ID(), 'class' => 'dropdown-categories'));
echo '
';
}
else
{
echo ' | Category: ';
the_category(', ');
echo '
';
}
}
function show_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;
?>