• 07-08-2024, 23:41:24
    #1
    Merhabalar herkese iyi akşamlar dilerim. Wordpress bir temayı aktif ederken böyle bir hata alıyorum

    Parse error: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) in /home/bpsxcz/public_html/wp-content/themes/filmzone/Tax-meta-class/Tax-meta-class.php on line 1

    bu hatayı nasıl çözebilirim?
  • 07-08-2024, 23:45:52
    #2
    GZR
    Tek Niyet: Memnuniyet ✅
    dosya yöneticisini kullanarak /wp-content/themes/bptema/functions.php dosyasına girin

    İlk satıra dikkat edin. PHP açılış etiketi <?php var mı ona bakın ayrıca başında veya sonunda fazladan bir kapanış ?> etiketi olmaması lazım

    Tema veya PHP sürümü eski olabilir
  • 07-08-2024, 23:59:44
    #3
    SeOptimizasyon adlı üyeden alıntı: mesajı görüntüle
    Merhabalar herkese iyi akşamlar dilerim. Wordpress bir temayı aktif ederken böyle bir hata alıyorum
    Parse error: syntax error, unexpected 'function' (T_FUNCTION) in /home/bpsxcz/public_html/wp-content/themes/bptema/functions.php on line 1

    bu hatayı nasıl çözebilirim?

    /bptema/functions.php içerisindeki kodları gpt'ye atın hatayı çözmesini isteyin. Sorunsuz kodları kopyala yapıştır yapın.
  • 08-08-2024, 00:26:11
    #4
    GZR adlı üyeden alıntı: mesajı görüntüle
    dosya yöneticisini kullanarak /wp-content/themes/bptema/functions.php dosyasına girin

    İlk satıra dikkat edin. PHP açılış etiketi <?php var mı ona bakın ayrıca başında veya sonunda fazladan bir kapanış ?> etiketi olmaması lazım

    Tema veya PHP sürümü eski olabilir
    Şu anda aldığım hata bu şekilde
    Warning: Declaration of bootstrap_4_walker_nav_menu::start_lvl(&$output, $depth) should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /home/bpsxcz/public_html/wp-content/themes/filmzone/functions.php on line 0

    Parse error: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) in /home/bpsxcz/public_html/wp-content/themes/filmzone/Tax-meta-class/Tax-meta-class.php on line 1

    funcstions.php böyle başlıyor 0.satırda hata görüyor ama <?php olarak başlıyor hata nerede anlamadım

    <?php
    /*------------------------------------------------------------
    FilmZone LikeThis Bölümü Start
    -------------------------------------------------------------
    */
    function likeThis($post_id,$action = 'get') {

    if(!is_numeric($post_id)) {
    error_log("Error: Value submitted for post_id was not numeric");
    return;
    } //if

    switch($action) {

    case 'get':
    $data = get_post_meta($post_id, '_likes');

    if(!is_numeric($data[0])) {
    $data[0] = 0;
    add_post_meta($post_id, '_likes', '0', true);
    } //if

    return $data[0];
    break;


    case 'update':
    if(isset($_COOKIE["like_" . $post_id])) {
    return;
    } //if

    $currentValue = get_post_meta($post_id, '_likes');

    if(!is_numeric($currentValue[0])) {
    $currentValue[0] = 0;
    add_post_meta($post_id, '_likes', '1', true);
    } //if

    $currentValue[0]++;
    update_post_meta($post_id, '_likes', $currentValue[0]);

    setcookie("like_" . $post_id, $post_id,time()*20);
    break;

    } //switch

    } //likeThis

    function printLikes($post_id) {
    $likes = likeThis($post_id);


    2. hatadaki Tax-meta-class.php ise 1.Satırda hata var diyor oda böyle başlıyor

    <?php
    /**
    * Tax Meta Class
    *
    * The Tax Meta Class is used by including it in your plugin r theme files and using its methods to
    * Add meta fields for WordPress Taxonomies (categories,tags and custom taxonomies). It is meant to be very simple and
    * straightforward.
    *
    * This class is derived from My-Meta-Box (https://github.com/bainternet/My-Meta-Box script) which is
    * a class for creating custom meta boxes for WordPress.
    *
    * @version 2.0.2
    * @copyright 2012-2014 Ohad Raz
    * @author Ohad Raz (email: admin@bainternet.info)
    * @link http://en.bainternet.info
    *
    * @license GNU General Public LIcense v3.0 - license.txt
    * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
    * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    * THE SOFTWARE.
    *
    * @package Tax Meta Class
    * @deprecated replace_insert_to_post_text() @since 1.8.3
    *
    */

    ikisinde de <?php olan satırda hata görüyor ama anlamasım basit bir hata belkide ancak bir türlü çözemedim daha önce çalışan bir temaydı bu yıllar sonra tekrar aktif ederken bu hataları alıyorum.
  • 08-08-2024, 00:26:53
    #5
    Cha adlı üyeden alıntı: mesajı görüntüle
    /bptema/functions.php içerisindeki kodları gpt'ye atın hatayı çözmesini isteyin. Sorunsuz kodları kopyala yapıştır yapın.
    bunu tam olarak nasıl yapacağımı bilmiyorum sizden yardım alabilir miyim bu konuda