Hey, ich habe mir grade die functions.php zerschossen. Ich finde den Fehler nicht, könnt ihr mir vielleicht helfen?
LG
http://fsrmed.de/wordpress/
PHP
<?php
//Turn a category ID to a Name
function cat_id_to_name($id) {
foreach((array)(get_categories()) as $category) {
if ($id == $category->cat_ID) { return $category->cat_name; break; }
}
}
// Pull theme options from database
function ot_option($key) {
global $settings;
$option = get_option($settings);
if(isset($option[$key])) return $option[$key];
else return FALSE;
}
// Include the theme options
include(TEMPLATEPATH."/includes/theme-options.php");
// Include the Custom Header code
include_once(TEMPLATEPATH.'/includes/custom-header.php');
// Load local Gravity Forms styles if the plugin is installed
if(class_exists("RGForms") && !is_admin()){
wp_enqueue_style("local_gf_styles", get_bloginfo('template_url') . "/includes/organic_gforms.css");
if(!get_option('rg_gforms_disable_css'))
update_option('rg_gforms_disable_css', true);
}
// Register sidebars
if ( function_exists('register_sidebars') )
register_sidebar(array('name'=>'Right Sidebar','before_widget'=>'<div id="%1$s" class="widget %2$s">','after_widget'=>'</div>','before_title'=>'<h4>','after_title'=>'</h4>'));
register_sidebar(array('name'=>'Left Sidebar','before_widget'=>'<div id="%1$s" class="widget %2$s">','after_widget'=>'</div>','before_title'=>'<h4>','after_title'=>'</h4>'));
register_sidebar(array('name'=>'Homepage Top Right','before_widget'=>'<div id="%1$s" class="widget %2$s">','after_widget'=>'</div>','before_title'=>'<h4>','after_title'=>'</h4>'));
register_sidebar(array('name'=>'Footer Left','before_widget'=>'<div id="%1$s" class="widget %2$s">','after_widget'=>'</div>','before_title'=>'<h4>','after_title'=>'</h4>'));
register_sidebar(array('name'=>'Footer Mid Left','before_widget'=>'<div id="%1$s" class="widget %2$s">','after_widget'=>'</div>','before_title'=>'<h4>','after_title'=>'</h4>'));
register_sidebar(array('name'=>'Footer Mid Right','before_widget'=>'<div id="%1$s" class="widget %2$s">','after_widget'=>'</div>','before_title'=>'<h4>','after_title'=>'</h4>'));
register_sidebar(array('name'=>'Footer Right','before_widget'=>'<div id="%1$s" class="widget %2$s">','after_widget'=>'</div>','before_title'=>'<h4>','after_title'=>'</h4>'));
// Load Content Limit
function the_content_limit($max_char, $more_link_text = 'Read More', $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 "<p>";
echo $content;
echo " <a href='";
the_permalink();
echo "'>"."Read More</a>";
echo "</p>";
}
else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) {
$content = substr($content, 0, $espacio);
$content = $content;
echo "<p>";
echo $content;
echo "...";
echo " <a href='";
the_permalink();
echo "'>".$more_link_text."</a>";
echo "</p>";
}
else {
echo "<p>";
echo $content;
echo " <a href='";
the_permalink();
echo "'>"."Read More</a>";
echo "</p>";
}
}
// Add ID and CLASS attributes to the first <ul> occurence in wp_page_menu
function add_menuclass($ulclass) {
return preg_replace('/<ul>/', '<ul class="menu">', $ulclass, 1);
}
add_filter('wp_page_menu','add_menuclass');
add_filter('wp_nav_menu','add_menuclass');
// Add custom background
if ( function_exists('add_custom_background') )
add_custom_background();
// Add navigation support
if ( function_exists('add_theme_support') )
add_theme_support( 'menus' );
// Add default posts and comments RSS feed links to head
if ( function_exists('add_theme_support') )
add_theme_support( 'automatic-feed-links' );
// Add thumbnail support
if ( function_exists('add_theme_support') )
add_theme_support('post-thumbnails');
add_image_size( 'home-feature', 620, 380, true ); // Homepage Feature Image
add_image_size( 'home-thumbnail', 430, 430 ); // Homepage Mid Thumbnail
add_image_size( 'home-side', 180, 180, true ); // Homepage Sidebar Thumbnail
add_image_size( 'portfolio', 950, 1200, true ); // Portfolio Image
add_image_size( 'cat-thumbnail', 440, 600, true ); // Category Thumbnail
?>
Alles anzeigen