Editing functions.php breaks the site!
-
I am working in Twenty Eleven child theme. I have added the fucntions.php and my first code tweak worked perfectly. But adding more code breaks the entire site. If I delete the file & retry, it works if I just add the first code tweak but if I include the second tweak, it breaks. I am new to this so I am not sure if I am doing anything wrong. Here is what I have so far:
First tweak:
<?phpdefine( ‘HEADER_IMAGE_WIDTH’, apply_filters( ‘twentyeleven_header_image_width’, 1100 ) );
define( ‘HEADER_IMAGE_HEIGHT’, apply_filters( ‘twentyeleven_header_image_height’, 288 ) );
?>Second tweak:
function twentyeleven_posted_on() {
printf( __( ‘<span class=”sep”>Posted on </span><time class=”entry-date” datetime=”%3$s” pubdate>%4$s</time>‘, ‘twentyeleven’ ),
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( ‘c’ ) ),
esc_html( get_the_date() ),
);
}Here I am trying to remove the “Posted in” tag on all posts. I want to keep the date.
I moved the php closing tag to the end of the code. What am I doing wrong? Any help would be much appreciated. Thank you!
- The topic ‘Editing functions.php breaks the site!’ is closed to new replies.