HTTP ERROR 500 after upgrading to 2.0 – Graphene child theme problem

  • Greybox

    #49007

    After upgrading to 2.0 my web site stopped responding (HTTP ERROR 500) even in admin mode.
    I was able to find out that the problem was caused by Graphene child theme I used for many years to show Graphene slider on other pages. I used functions.php described in this article:
    http://www.prasannasp.net/graphene-slider-on-other-pages-modifying-theme-functions-using-a-child-theme/:

    <?php
    function graphene_display_slider(){ 
    graphene_slider();
    add_action('wp_footer', 'graphene_scrollable'); 
    }
     
    function custom_enqueue_scripts(){
                if ( ! is_admin() ) { // Front-end only
                        wp_enqueue_script( 'graphene-jquery-tools' ); // jQuery Tools, required for slider
                }
        }
        add_action( 'wp_enqueue_scripts', 'custom_enqueue_scripts' );
    ?>
    

    I had to remove my functions.php to bring the web site back to life.
    How can I bring Graphene slider back on my other pages in v2?

    Admin

    Syahir Hakim

    #49012

    Try modifying the code into this:

    <?php
    function my_graphene_display_slider(){ 
    	global $graphene_settings;
    	if ( $graphene_settings['slider_disable'] || is_front_page() ) return;
    
    	if ( ! $graphene_settings['slider_position'] ) {
    		if ( $graphene_settings['slider_full_width'] ) add_action( 'graphene_before_content-main', 'graphene_slider' );
    		else add_action( 'graphene_top_content', 'graphene_slider' );	
    	} else {
    		if ( $graphene_settings['slider_full_width'] ) add_action( 'graphene_after_content', 'graphene_slider' );
    		else add_action( 'graphene_bottom_content', 'graphene_slider', 11 );
    	}
    }
    add_action( 'template_redirect', 'my_graphene_display_slider' );
    

    Greybox

    #49032

    Problem resolved, thank you!!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.