• Resolved gokh

    (@gokh)


    Hi,

    I learned the cause of the problem I had before. Theme was installed with version 5.5.

    When I upgraded to Php7, the properties panel does not open. But it opens in Php5.5. Is the solution possible?

    The page I need help with: [log in to see the link]

Viewing 15 replies - 31 through 45 (of 87 total)
  • Theme Author terrathemes

    (@terrathemes)

    These codes are codes that come after the customizer import-export for the child theme, I did not add.

    If you’re finished with setting up the Customizer you can delete the code and deactivate the plugin.

    but there is a problem with the image.

    Which image do you mean? The header image or the logo? Both looks fine on my browser.

    The next code

    You don’t need so many PHP-tags inside of your functions.php. If you have the PHP-opening tag <?php once at the beginning of your file it’s enough. You don’t need to close it.

    Simple Custom CSS and JS,

    It did not work
    https://prntscr.com/jdfy01

    This code has to be added into the functions.php of your child theme, because this is PHP code. Remove it from your my-custom-js.js file

    /**
     * Enqueue custom functions script
     */
    function meteorite_child_custom_functions() {
    	wp_enqueue_script( 'meteorite-child-custom-js', get_stylesheet_directory_uri() . '/js/my-custom-functions.js', array('jquery'), '', true );
    }
    add_action( 'wp_enqueue_scripts', 'meteorite_child_custom_functions' );
    Thread Starter gokh

    (@gokh)

    functions.php file
    Additional import-export codes.

    I deleted the codes, you can look again.

    https://prnt.sc/jdnwlx

    Thread Starter gokh

    (@gokh)

    Theme Author terrathemes

    (@terrathemes)

    Please tell me what you need to know now. Which code works and which does not?

    Thread Starter gokh

    (@gokh)

    It works in 2 cases, but when I delete the codes, a line appears on the screen (?>).

    Theme Author terrathemes

    (@terrathemes)

    Then deactivate the plugin and then delete it.

    Thread Starter gokh

    (@gokh)

    2 plugin is disabled. When I add it to functions.php file it does not work.

    <?php
    function meteorite_child_custom_functions() {
    	wp_enqueue_script( 'meteorite-child-custom-js', get_stylesheet_directory_uri() . '/js/my-custom-functions.js', array('jquery'), '', true );
    }
    add_action( 'wp_enqueue_scripts', 'meteorite_child_custom_functions' );
    
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    function my_theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
     
    }
    
    /**
     * Site branding
     */
    if ( ! function_exists('meteorite_sitebranding') ):
    function meteorite_sitebranding() {
    	$logo_light = get_theme_mod( 'logo_light', '' );
    	$has_custom_logo = has_custom_logo();
    	
    	if ( $has_custom_logo || $logo_light) {
    		if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
    			the_custom_logo();
    		}
    		if ( $logo_light ) {
    			echo '<a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr(get_bloginfo('name')) . '"><img class="site-logo light" src="' . esc_url($logo_light) . '" alt="' . esc_attr(get_bloginfo('name')) . '" /></a>'; 
    		}
    	} else {
    		echo '<div class="site-brand">';
    		if ( is_front_page() && is_home() ) :
    			echo '<h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . get_bloginfo('name', 'display') . '</a></h1>';
    		else :
    			echo '<p class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . get_bloginfo('name', 'display') . '</a></p>';
    		endif;
    		echo '<p class="site-description">' . get_bloginfo('description', 'display') . '</p>';
    		echo '</div>'; // /.site-brand
    	}
    	echo '<p class="custom-logo-text">|  Tasar?m ? Tan?t?m</p>';
    }
    endif;
    

    ? Yes I think the wrong erase is no problem now the image is improved.

    Theme Author terrathemes

    (@terrathemes)

    I don’t know what you did but your website doesn’t load correctly anymore. Please undo your last changes if you can or remove some of your code functions from the functions.php

    Thread Starter gokh

    (@gokh)

    I know, I left it for you to see. The code I added to the Functions.php file caused it.

    function meteorite_child_custom_functions() {
    	wp_enqueue_script( 'meteorite-child-custom-js', get_stylesheet_directory_uri() . '/js/my-custom-functions.js', array('jquery'), '', true );
    }
    add_action( 'wp_enqueue_scripts', 'meteorite_child_custom_functions' );
    Thread Starter gokh

    (@gokh)

    I got the codes back and the site is fine.

    View problematic functions.ph file.
    https://prntscr.com/jdtxf7

    Theme Author terrathemes

    (@terrathemes)

    Please remove all the code from the functions.php of your child theme and use this:

    <?php
    
    function my_theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
     
    }
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    
    function meteorite_child_custom_functions() {
    	wp_enqueue_script( 'meteorite-child-custom-js', get_stylesheet_directory_uri() . '/js/my-custom-functions.js', array('jquery'), '', true );
    }
    add_action( 'wp_enqueue_scripts', 'meteorite_child_custom_functions' );
    
    /**
     * Site branding
     */
    if ( ! function_exists('meteorite_sitebranding') ):
    function meteorite_sitebranding() {
    	$logo_light = get_theme_mod( 'logo_light', '' );
    	$has_custom_logo = has_custom_logo();
    	
    	if ( $has_custom_logo || $logo_light) {
    		if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
    			the_custom_logo();
    		}
    		if ( $logo_light ) {
    			echo '<a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr(get_bloginfo('name')) . '"><img class="site-logo light" src="' . esc_url($logo_light) . '" alt="' . esc_attr(get_bloginfo('name')) . '" /></a>'; 
    		}
    	} else {
    		echo '<div class="site-brand">';
    		if ( is_front_page() && is_home() ) :
    			echo '<h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . get_bloginfo('name', 'display') . '</a></h1>';
    		else :
    			echo '<p class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . get_bloginfo('name', 'display') . '</a></p>';
    		endif;
    		echo '<p class="site-description">' . get_bloginfo('description', 'display') . '</p>';
    		echo '</div>'; // /.site-brand
    	}
    	echo '<p class="custom-logo-text">|  Tasar?m ? Tan?t?m</p>';
    }
    endif;

    I tested this on my test website and it worked. Please try to clear the cache of your caching plugin.

    Thread Starter gokh

    (@gokh)

    I changed the code, I did the cache refresh. The codes did not work.

    Theme Author terrathemes

    (@terrathemes)

    Please deactivate all of your caching plugins.

    Thread Starter gokh

    (@gokh)

    W3 Total Cache?

    Theme Author terrathemes

    (@terrathemes)

    I don’t know which plugins you installed, but yes, this could be the one.

Viewing 15 replies - 31 through 45 (of 87 total)
  • The topic ‘Problem upgrading from Php5.5 to Php7’ is closed to new replies.