• Resolved Ahmed

    (@akalos)


    I’ve created a child theme for albar but it isnt activating. Here is the error i get:

    Fatal error: Call to undefined function kaira_theme_option() in C:\xampp\htdocs\plantech\wp-content\themes\albar\header.php on line 8

    Kindly help please and thanks in advance

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Ahmed

    (@akalos)

    anybody help me out here please

    Thread Starter Ahmed

    (@akalos)

    Sorted it out

    simonphoto

    (@simonphoto)

    How did you fix the problem?

    i have the same problem. how was it corrected?

    the answer would be much appreciated.

    Thread Starter Ahmed

    (@akalos)

    Hey mate,

    add this piece of code to the functions file of your child theme:

    if ( file_exists( get_template_directory() . ‘/settings/class.kaira-theme-settings.php’ ) ) :
    require_once( get_template_directory() . ‘/settings/class.kaira-theme-settings.php’ );
    endif;

    It should sort you out.

    Theme Author Kaira

    (@kaira)

    Hi All

    Sorry for the delayed response, my bad.

    Yes, was going to say to add that code to your functions.php file of your child theme.

    Glad you got it sorted out quick though.

    simonphoto

    (@simonphoto)

    the whip hand, did you get it?

    Thread Starter Ahmed

    (@akalos)

    Thanks Kaira

    makredactie

    (@makredactie)

    Hi, my child theme also doesn’t work. I’ve used the child theme plugin to create the files, but after activiting this child theme, my website doesn’t show anymore, it’s completely white. I assume someting is wrong in the PHP file?

    I found the lines above that I need to add to the php-file, but where exactly do I need to add them?

    There are 2 PHP files, footer and header. What should be the new complete code of both files?

    Many thanks,
    Maaike

    makredactie

    (@makredactie)

    Current code of the header is:

    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset=”<?php bloginfo( ‘charset’ ); ?>” />
    <meta name=”viewport” content=”width=device-width, initial-scale=1.0, maximum-scale = 1.0, user-scalable=0″ />
    <link rel=”profile” href=”https://gmpg.org/xfn/11&#8243; />
    <link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>” />

    <?php if ( kaira_theme_option( ‘kra-favicon’ ) ) :
    echo ‘<link rel=”icon” href=”‘ . esc_url( kaira_theme_option( ‘kra-favicon’ ) ) . ‘”>’;
    endif; ?>

    <?php wp_head(); ?>
    </head>

    <body <?php body_class(); ?>>

    <?php if ( kaira_theme_option( ‘kra-website-layout’ ) == ‘site-layout-boxed’ ) : ?>
    <div class=”site-boxed”>
    <?php endif; ?>

    <?php get_template_part( ‘/includes/headers/header-layout-one’ ); ?>

    <?php if ( is_front_page() ) : ?>

    <?php if ( kaira_theme_option( ‘kra-enable-home-slider’ ) == 1 ) : ?>

    <?php get_template_part( ‘/includes/headers/homepage-slider’ ); ?>

    <?php endif; ?>

    <?php endif; ?>

    if ( file_exists( get_template_directory() . ‘/settings/class.kaira-theme-settings.php’ ) ) :
    require_once( get_template_directory() . ‘/settings/class.kaira-theme-settings.php’ );
    endif;

    where should I add the lines:

    if ( file_exists( get_template_directory() . ‘/settings/class.kaira-theme-settings.php’ ) ) :
    require_once( get_template_directory() . ‘/settings/class.kaira-theme-settings.php’ );
    endif;

    ??

    Thread Starter Ahmed

    (@akalos)

    Put those lines in the functions file of your child theme

    makredactie

    (@makredactie)

    hi,

    I added the code to the functions.php but the website still doesn’t work, it still gives a HTTP500 error.

    Do you know what else can be wrong?

    makredactie

    (@makredactie)

    oh sorry, it works!

    What I did wrong:

    I used the functions.php from the parent theme and added the lines.
    Now I created an empty functions.php and put the lines in it.
    Now it works…

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Child theme not activating’ is closed to new replies.