Was stimmt denn bei meiner functions.php nicht? Bei jeder Ergänzung wie zum Beispiel
oder auch
funktioniert die gesamte Webseite nicht mehr. Egal ob die Ergänzungen nach der ersten Zeile oder vor der letzten Zeile angebracht werden. Was stimmt da nicht?
Und das ist die besagte PHP:
PHP
<?
add_editor_style();
# Zwei neue Menues
register_nav_menu( 'footer', 'Footer' );
// Shortcodes für 2 Spalten
// Linke Spalte
function basic_leftcolumn($atts, $content = null) {
if(!empty($content)){
return do_shortcode('<div class="leftcolumn">' . $content . '</div>');}
return '<div class="leftcolumn">' . $content . '</div>';
}
add_shortcode("leftcolumn", "basic_leftcolumn");
// Rechte Spalte
function basic_rightcolumn($atts, $content = null) {
if(!empty($content)){
return do_shortcode('<div class="rightcolumn">' . $content . '</div>');}
return '<div class="rightcolumn">' . $content . '</div>';
}
add_shortcode("rightcolumn", "basic_rightcolumn");
// Spalte mit vollständiger Breite
function basic_topcolumn($atts, $content = null) {
if(!empty($content)){
return do_shortcode('<div class="topcolumn">' . $content . '</div>');}
return '<div class="topcolumn">' . $content . '</div>';
}
add_shortcode("topcolumn", "basic_topcolumn");
add_filter('excerpt_length', 'my_excerpt_length');
function my_excerpt_length($length) {
return 45; }
if ( ! function_exists( 'twentyeleven_comment' ) ) :
/**
* Template for comments and pingbacks.
*
* To override this walker in a child theme without modifying the comments template
* simply create your own twentyeleven_comment(), and that function will be used instead.
*
* Used as a callback by wp_list_comments() for displaying the comments.
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case 'pingback' :
case 'trackback' :
?>
<li class="post pingback">
<p><?php _e( 'Pingback:', 'twentyeleven' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?></p>
<?php
break;
default :
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<article id="comment-<?php comment_ID(); ?>" class="comment">
<footer class="comment-meta">
<div class="comment-author vcard">
<?php
$avatar_size = 68;
if ( '0' != $comment->comment_parent )
$avatar_size = 39;
echo get_avatar( $comment, $avatar_size );
/* translators: 1: comment author, 2: date and time */
printf( __( '%1$s on %2$s <span class="says">said:</span>', 'twentyeleven' ),
sprintf( '<span class="fn">%s</span>', get_comment_author_link() ),
sprintf( '<a href="%1$s"><time pubdate datetime="%2$s">%3$s</time></a>',
esc_url( get_comment_link( $comment->comment_ID ) ),
get_comment_time( 'c' ),
/* translators: 1: date, 2: time */
sprintf( __( '%1$s um %2$s', 'twentyeleven' ), get_comment_date(), get_comment_time() )
)
);
?>
<?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .comment-author .vcard -->
<?php if ( $comment->comment_approved == '0' ) : ?>
<em class="comment-awaiting-moderation"><?php _e( 'Ihr Kommentar wird moderiert.', 'twentyeleven' ); ?></em>
<br />
<?php endif; ?>
</footer>
<div class="comment-content"><?php comment_text(); ?></div>
<div class="reply">
<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Anworten <span>↓</span>', 'twentyeleven' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
</div><!-- .reply -->
</article><!-- #comment-## -->
<?php
break;
endswitch;
}
endif; // ends check for twentyeleven_comment()
?>
Alles anzeigen