サポート » 使い方全般 » function.phpエラーについて

  • 解決済 mikazuki88

    (@mikazuki88)


    ホームページの修正の経過で、function.phpファイルに少し手を加えましたが、wordpressにログインができなくなり、最初の状況にもどしたいといろいろとページを探し、手を加えてみましたが、エラーが解除できず、wordpressにログインができず、ホームページも閲覧できない状況です。申し訳ありませんが、対処法をご指導いただければと思います。
    Parse error: syntax error, unexpected ‘if’ (T_IF) in /export/sd210/www/jp/r/e/gmoserver/3/6/sd0450636/jumoku.jp/wp-content/themes/hpb18T20140902120938/functions.php on line 11

    ここよりfunction.phpファイルの現状です。
    <?php>
    /**
    * _hpb functions and definitions
    *
    * @package _hpb
    */

    /**
    * Set the content width based on the theme’s design and stylesheet.
    */
    if ( ! isset( $content_width ) ):
    $content_width = 640; /* pixels */

    /**
    * Load Jetpack compatibility file.
    */
    require( get_template_directory() . ‘/inc/jetpack.php’ );

    if ( ! function_exists( ‘_hpb_setup’ ) ) :
    /**
    * Sets up theme defaults and registers support for various WordPress features.
    *
    * Note that this function is hooked into the after_setup_theme hook, which runs
    * before the init hook. The init hook is too late for some features, such as indicating
    * support post thumbnails.
    */
    function _hpb_setup() {

3件の返信を表示中 - 1 - 3件目 (全3件中)
  • バックアップデータがあれば、
    「バックアップデータに戻す」
    のが確実だと思われますが、バックアップはあるでしょうか。

    <?php>

    となってますが……

    トピック投稿者 mikazuki88

    (@mikazuki88)

    Fumito MIZUNO様web
    バックアップを取らずにこんな状況になってしまいました。基本的なミスです。
    以後気をつけます。

    Hinaloe様
    ありがとうございました。括弧が余分だったようです。はずして修正をしたら、ページが閲覧できるようになりました。ありがとうございました。

3件の返信を表示中 - 1 - 3件目 (全3件中)
  • トピック「function.phpエラーについて」には新たに返信することはできません。