• Hi, I tried to create a Child theme for my website. My style.css is:
    /*
    Theme Name: Albar Child
    Template: albar
    */
    @import url(../albar/style.css);

    And my functions.php is:
    <?php

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

    But not working. Please someone help me out. It will be better to provide the full code. Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • me too ??

    WORKS like a CHARM ??

    functions.php

    <?php
    
    if
    ( file_exists( get_template_directory() . '/settings/class.kaira-theme-settings.php' ) ) :
    require_once( get_template_directory() . '/settings/class.kaira-theme-settings.php' );
    endif;

    style.css

    /*
    Theme Name: ALBAR Child Theme
    Theme URI:
    Author: onl9m8
    Author URI: https://www.MABNAIT.IR
    Description:
    Template: albar
    Version: 1.0
    License: GNU General Public License
    License URI:
    Tags:
    */
    
    @import url("../albar/style.css");
    
    /* Add costume style below here ;-) */

    Okay, that should work – just tried it on a test site.

    If you have not already done so, switch to another theme and then back to that one. Make sure you clear any caching on your site and browser too.

    If it’s not working, what’s the error or what happens?

    Thread Starter store24combd

    (@store24combd)

    Thanks @onl9m8 and @wpyogi. I tried to add some functions but error (white screen) . Can anyone help me out ?

    `<?php

    if
    ( file_exists( get_template_directory() . ‘/settings/class.kaira-theme-settings.php’ ) ) :
    require_once( get_template_directory() . ‘/settings/class.kaira-theme-settings.php’ );
    endif;
    // Related product number and column
    function woo_related_products_limit() {
    global $product;

    $args[‘posts_per_page’] = 6;
    return $args;
    }
    add_filter( ‘woocommerce_output_related_products_args’, ‘jk_related_products_args’ );
    function jk_related_products_args( $args ) {

    $args[‘posts_per_page’] = 3; // 3 related products
    $args[‘columns’] = 3; // arranged in 3 columns
    return $args;
    }

    // Display 24 products per page. Goes in functions.php
    add_filter( ‘loop_shop_per_page’, create_function( ‘$cols’, ‘return 12;’ ), 20 );

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can not create Albar Child theme’ is closed to new replies.