Title: Parse error: syntax error. Can&#039;t change themes
Last modified: August 21, 2016

---

# Parse error: syntax error. Can't change themes

 *  [ksmyth1228](https://wordpress.org/support/users/ksmyth1228/)
 * (@ksmyth1228)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-cant-change-themes/)
 * Very new to WordPress. Site: kathysmythdesign.com
    I was using Portfolio Press
   theme with some success until I added this code to the options-functions.php 
   to add more portfolio pieces to my gallery:
 *     ```
       function mytheme_posts_per_page() {
            return '16';  // Return however many items you choose
       }
       add_filter( 'portfoliopress_posts_per_page', 'mytheme_posts_per_page' );
       ```
   
 * Got the error message: _Parse error: syntax error, unexpected ‘)’ in /home/smyth154/
   public\_html/wp-content/themes/portfolio-press/extensions/options-functions.php
   on line 210_ and I could no longer log into Word Press.
    I then asked for help
   from my web host (HostGator). They got me back into Word Press, but changed the
   theme to Twenty Twelve. Now I cannot change to any other themes at all. I do 
   not have a copy of the options-functions.php file and now don’t even see that
   when I downloaded a fresh copy of the Portfolio Press theme.

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

 *  [Alicia](https://wordpress.org/support/users/amduffy/)
 * (@amduffy)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-cant-change-themes/#post-3812742)
 * If you’re **not** using a child theme I would add this to the bottom of **functions.
   php** in your theme (not options-functions.php)
 * options-functions.php is located in the extensions folder in your theme.
 *  Thread Starter [ksmyth1228](https://wordpress.org/support/users/ksmyth1228/)
 * (@ksmyth1228)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-cant-change-themes/#post-3812797)
 * OK. What should I add to functions.php?
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-cant-change-themes/#post-3812798)
 * **Don’t modify any theme files**. Are you able to login and use WordPress at 
   this point? If not, you need to use FTP to deactivate that theme.
 *  Thread Starter [ksmyth1228](https://wordpress.org/support/users/ksmyth1228/)
 * (@ksmyth1228)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-cant-change-themes/#post-3812799)
 * No I can’t even log in. I didn’t change any files, just poking around at this
   point.
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-cant-change-themes/#post-3812800)
 * >  until I added this code to the options-functions.php to add more portfolio
   > pieces to my gallery:
 * Isn’t that changing a file?
 * Aside from that, if you cannot login now, you will need to use FTP to deactivate
   that theme. If you don’t have FTP access set up, ask your hosting company how
   to do that. Then find the theme folder on the server and change the name on it:
 *     ```
       wordpress
          wp-content
             themes
                portfolio-pressOLD
                twentytwelve
       ```
   
 * Make sure (as in the above list) that twentytwelve is in that folder – in which
   case WP will default to it, and hopefully allow you to access your site again.

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

The topic ‘Parse error: syntax error. Can't change themes’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-cant-change-themes/#post-3812800)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
