简体   繁体   中英

Wordpress: SCREAM: Error suppression ignored for, Parse error: syntax error,

Ok so I'm creating a theme for myself, and even when I use the most basic of loops, I still get a php error:

( ! ) SCREAM: Error suppression ignored for
( ! ) Parse error: syntax error, unexpected end of file in C:\wamp\www\newsite\blog\wp-content\themes\cakes\index.php on line 121
Call Stack
#   Time    Memory  Function    Location
1   0.0015  142656  {main}( )   ..\index.php:0
2   0.0023  144760  require( 'C:\wamp\www\newsite\blog\wp-blog-header.php' )    ..\index.php:19
3   0.3452  9323760 require_once( 'C:\wamp\www\newsite\blog\wp-includes\template-loader.php' )  ..\wp-blog-header.php:16

This doesn't happen with the twentyeleven theme, or any other theme I use, so I know it's not a problem with the wordpress setup. I just have no idea what it is, do I need to reference anything in my theme files?

Here's a pastebin of my index.php: http://pastebin.com/ahaFhy43 ,That's the only file besides style.css in my theme's folder.

EDIT: solved, simply had to add this to the top of my template:

<?php 
/* Short and sweet */
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');
?>

Solved, simply add

<?php 
/* Short and sweet */
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');
?>

to the top of your index.php

Sometimes it happens when you have not cleared your site's cache. define('WP_USE_THEMES', false); in index.php will be lost once wordpress upgrade is performed

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM