__( 'Header Menu' ), 'page-menu' => __( 'Page Menu' ) ) ); } add_action( 'init', 'register_my_menus' ); // Register Widgets function candd_widgets_init() { // Home Sidebar register_sidebar( array ( 'name' => __( 'Home Sidebar', 'candd' ), 'id' => 'home-sidebar', 'description' => __( 'Home Sidebar', 'themejunkie' ), 'before_widget' => '
', 'after_widget' => "
", 'before_title' => '

', 'after_title' => '

', ) ); // Page Sidebar register_sidebar( array ( 'name' => __( 'Page Sidebar', 'candd' ), 'id' => 'page-sidebar', 'description' => __( 'Page Sidebar', 'candd' ), 'before_widget' => '
', 'after_widget' => "
", 'before_title' => '

', 'after_title' => '

', ) ); // Post Sidebar register_sidebar( array ( 'name' => __( 'Post Sidebar', 'candd' ), 'id' => 'post-sidebar', 'description' => __( 'Post Sidebar', 'candd' ), 'before_widget' => '
', 'after_widget' => "
", 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'init', 'candd_widgets_init' ); /*-----------------------------------------------------------------------------------*/ /* limit excerpt /*-----------------------------------------------------------------------------------*/ function candd_content_limit($max_char, $more_link_text = '', $stripteaser = 0, $more_file = '') { $content = get_the_content($more_link_text, $stripteaser, $more_file); $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); $content = strip_tags($content); if (strlen($_GET['p']) > 0) { echo ""; echo $content; echo " ..."; } else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) { $content = substr($content, 0, $espacio); $content = $content; echo ""; echo $content; echo " ..."; } else { echo ""; echo $content; } } // Make theme available for translation // Translations can be filed in the /languages/ directory load_theme_textdomain( 'candd', get_template_directory() . '/languages' ); ?>