Title: Parse error: syntax error, unexpected $end in&#8230;
Last modified: August 24, 2016

---

# Parse error: syntax error, unexpected $end in…

 *  [crb09a](https://wordpress.org/support/users/crb09a/)
 * (@crb09a)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-end-in-15/)
 * I was trying to adjust some code on my site (but had been saving any changes 
   I did in case an error occured) when all of a sudden I got the error “Parse error:
   syntax error, unexpected $end in /hermes/bosoraweb136/b1866/dom.catrinabaileycom/
   public_html/wp-content/themes/panaroma/functions.php on line 243”.
 * I hadn’t even gotten anywhere near line 243 while editing, so nothing from that
   was changed.
 * Below is lines 190-243:
    /** * Load custom functions file. */ require get_template_directory().‘/
   inc/custom-functions.php’;
 * function panaroma_custom_blogpost_pagination( $wp_query ){
    $big = 999999999;//
   need an unlikely integer if ( get_query_var(‘paged’) ) { $pageVar = ‘paged’; }
   elseif ( get_query_var(‘page’) ) { $pageVar = ‘page’; } else { $pageVar = ‘paged’;}
   $pagin = paginate_links( array( ‘base’ => str_replace( $big, ‘%#%’, esc_url( 
   get_pagenum_link( $big ) ) ), ‘format’ => ‘?’.$pageVar.’=%#%’, ‘current’ => max(
   1, get_query_var($pageVar) ), ‘total’ => $wp_query->max_num_pages, ‘prev_text’
   => ‘« Prev’, ‘next_text’ => ‘Next »’, ‘type’ => ‘array’ ) ); if( is_array($pagin)){
   $paged = ( get_query_var(‘paged’) == 0 ) ? 1 : get_query_var(‘paged’); echo ‘
   <div class=”pagination”><div>
    - ‘;
       echo ‘
    - <span>’. $paged . ‘ of ‘ . $wp_query->max_num_pages .'</span>
    - ‘;
       foreach ( $pagin as $page ) { echo ”
    - $page
    - “;
       } echo ‘
 * </div></div>’;
    } }
 * function panaroma_get_slug_by_id($id) {
    $post_data = get_post($id, ARRAY_A);
   $slug = $post_data[‘post_name’]; return $slug; }
 * // Add support for Vertical Featured Images
    if ( ! function_exists( ‘panaroma_vertical_check’)):
   function panaroma_vertical_check( $html, $post_id, $post_thumbnail_id, $size,
   $attr ) { $image_data = wp_get_attachment_image_src( $post_thumbnail_id , ‘large’);//
   Get the image width and height from the data provided by wp_get_attachment_image_src()
   $width = $image_data[1]; $height = $image_data[2]; if ( $height > $width ) { 
   $html = str_replace( ‘attachment-‘, ‘vertical-image attachment-‘, $html ); } 
   return $html; } endif; add_filter( ‘post_thumbnail_html’, ‘panaroma_vertical_check’,
   10, 5 );
 * Any idea what’s wrong? I’m not very fluent in code so I cannot tell much. Anything
   would help.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [jack randall](https://wordpress.org/support/users/theotherlebowski/)
 * (@theotherlebowski)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-end-in-15/#post-6006097)
 * you may not have reached line 243 but the $end on line 243 might be terminating
   something from way before line 243. did you back up the file before you started
   tweaking? if so just reupload that back up and either start again (not advisable)
   or create a child theme and a functions.php file in there and add in your custom
   code there so you don’t mess with the parent theme.
 *  Thread Starter [crb09a](https://wordpress.org/support/users/crb09a/)
 * (@crb09a)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-end-in-15/#post-6006291)
 * I tried to replace the code with the original code, from before i started messing
   with it. Not only am i getting the same error, but now I cant even go back to
   edit it.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Parse error: syntax error, unexpected $end in…’ is closed to new replies.

## Tags

 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [crb09a](https://wordpress.org/support/users/crb09a/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-end-in-15/#post-6006291)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
