• Hi,
    I installed Kale theme in September, almost two weeks ago. For customizing I installed the child theme configurator plug in, and installed a child theme.
    I did not use any additional code for installation. I did check Github and there are 2 codes, one posted in 2017 and another in 2018. But since I wasn’t sure how to use the code, I just installed the theme and used the child theme configurator plug in to the create a child theme.
    Now my home page looks different. I have a huge space between the featured posts slider at the top and the large featured posts at the bottom. No matter how many posts I make, none of them show up in the home page as recent posts. But the Kale original theme has the recent posts filling up the gap between the top featured posts slider and the bottom large featured post.
    Is my homepage different because I didn’t use any code while installing the child theme? How can I resolve this?
    Thanks in advance for any help.

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

Viewing 15 replies - 1 through 15 (of 24 total)
  • Hi burgers.

    Thank you for contacting us and for using our theme. We appreciate it.

    As far as I can tell, that difference comes from the fact that your parent theme has been set to show your blog posts on the homepage (Settings -> Reading -> Your latest posts) while your child theme is set up to have a static page as your homepage (Settings -> Reading -> A static page).

    So you can easily change that in your child theme.

    Hope this helps but if you have any additional questions, feel free to ask.

    Kind regards.

    Thread Starter burgers

    (@burgers)

    Thank you for the quick reply Siniplyrathemes.

    When I did what you said, all the posts show up on my home page, but somehow disappear from my blog page.
    Can you please check my blog (link provided in the first post) and take a look at my blog page.

    You’re welcome.

    That’s the way WordPress works, actually. If you set your homepage as a static page then it will not show your recent posts on it but you can have the posts on another page.
    But if you want to have your blog posts on the homepage then you can not have another page for the recent blog posts. It applies to any theme since it is the core feature of WordPress. You can’t have it both ways, it is either/or setting.

    This tutorial explains it nicely – http://www.wpbeginner.com/wp-tutorials/how-to-create-a-separate-page-for-blog-posts-in-wordpress/

    Hope this helps but if you have additional questions, feel free to ask.

    Kind regards.

    Thread Starter burgers

    (@burgers)

    Thanks. Are you sure I haven’t messed up something while installing the child theme? I mentioned in my first post that there is some code to configure child theme on Github, but there are two and I don’t know which one to use and how to use.

    Also, I have seen people use the same theme with a home page showing recent posts AND and blog page with all the posts. So clearly I have made a mistake somewhere.

    If you take a look at this Kale demo theme, there is a home page AND a blog page. This is what I am talking about.
    http://www.lyrathemes.com/preview/?theme=kale

    • This reply was modified 5 years, 6 months ago by burgers.
    • This reply was modified 5 years, 6 months ago by burgers.
    • This reply was modified 5 years, 6 months ago by burgers.
    Thread Starter burgers

    (@burgers)

    ..

    • This reply was modified 5 years, 6 months ago by burgers.

    You’re welcome.

    The content of https://gist.github.com/lyrathemes/7f5c791b7351b7cadd7ab9faaba0b204 should go in the functions.php file in the child theme (if it is not there already).
    Other than that, as I mentioned previously, that either/or choice is built-in in the WordPress core.

    Which doesn’t mean you can’t cheat. 🙂 For instance, you can have a category named “blog” then assign that category to every single post you make. Then simply put “Blog” category to the Main menu and once you click on it, it will present all of your posts on that page.

    And the reason why you see that feature on our demo page is exactly that – it is a demo, where we need to show all the available options and it is done in a way that can’t be achieved in the “standard” WordPress installation.

    Hope this helps. But feel free to ask for any clarification.

    Kind regards.

    Thread Starter burgers

    (@burgers)

    Regarding the child theme code you gave me, do you suggest I add that now?
    I don’t know where to find the php file.

    which doesn’t mean you can’t cheat. 🙂 For instance, you can have a category named “blog” then assign that category to every single post you make. Then simply put “Blog” category to the Main menu and once you click on it, it will present all of your posts on that page

    I did that and my blog also has posts showing up. This solved my problem.
    Thank you very much.

    If you look at my home page now, it shows literally every post I make. That makes it very cluttered. Is there a way I can limit the number of posts to show up on the home page.

    PS: I am reposting this reply for the second time because the firt one is held for moderation. maybe because i edited it a couple of time or i don’t know why?

    • This reply was modified 5 years, 6 months ago by burgers.

    “Held for moderation” happens occasionally to everyone, I suppose. 🙂 Happened to me at least 3-4 times recently, God knows why. It is AI stuff in a way. 🙂

    You can control how many posts get shown by going to your Dashboard and then to Settings -> Reading and adjust the number next to “Blog pages show at most” from currently 10 to any number you want (other than 0).

    And the functions.php file should be in your /wp-content/themes/kale-child/ folder.

    Kind regards.

    Thread Starter burgers

    (@burgers)

    Hi Thanks again.

    I checked my php file. The code I have there is:

    <?php
    // Exit if accessed directly
    if ( !defined( ‘ABSPATH’ ) ) exit;

    // BEGIN ENQUEUE PARENT ACTION
    // AUTO GENERATED – Do not modify or remove comment markers above or below:

    if ( !function_exists( ‘chld_thm_cfg_parent_css’ ) ):
    function chld_thm_cfg_parent_css() {
    wp_enqueue_style( ‘chld_thm_cfg_parent’, trailingslashit( get_template_directory_uri() ) . ‘style.css’, array( ‘bootstrap’,’bootstrap-select’,’smartmenus-bootstrap’,’font-awesome’,’owl-carousel’ ) );
    }
    endif;
    add_action( ‘wp_enqueue_scripts’, ‘chld_thm_cfg_parent_css’, 10 );

    // END ENQUEUE PARENT ACTION

    Have I got the correct code?

    I did not copy paste anything from github. The link you gave me has two codes. One is older and then there is a revised code. So I am not sure what to do.

    • This reply was modified 5 years, 6 months ago by burgers.
    Thread Starter burgers

    (@burgers)

    ..

    • This reply was modified 5 years, 6 months ago by burgers.
    • This reply was modified 5 years, 6 months ago by burgers.
    • This reply was modified 5 years, 6 months ago by burgers.

    Nope, that is style.css file.

    What you need is functions.php file.

    The code on that link has 30 lines in total:

    <?php
    add_action( 'wp_enqueue_scripts', 'kale_child_enqueue_styles' );
    function kale_child_enqueue_styles() {
        
        $parent_style = 'kale-style';
        $deps = array('bootstrap', 'bootstrap-select', 'font-awesome', 'owl-carousel');
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' , $deps);
        
        wp_enqueue_style( 'kale-style-child', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ), wp_get_theme()->get('Version') );
    }
    
    function kale_get_option($key){
        global $kale_defaults;
        
        $parent_theme = get_template_directory();
        $parent_theme_slug = basename($parent_theme);
        $parent_theme_mods = get_option( "theme_mods_{$parent_theme_slug}");
        
        $value = '';
        $child_value = get_theme_mod($key);
        if(!empty($child_value)){
            $value = $child_value;
        }
        else if (!empty($parent_theme_mods) && isset($parent_theme_mods[$key])) {
            $value = $parent_theme_mods[$key];
        } else if (is_array($kale_defaults) && array_key_exists($key, $kale_defaults)) 
            $value = get_theme_mod($key, $kale_defaults[$key]); 
        return $value;
    }
    ?>

    Kind regards.

    Thread Starter burgers

    (@burgers)

    Sorry. I updated my post with the correct code. The code in my php file much shorter. Notice it has only 15 lines.

    <?php
    // Exit if accessed directly
    if ( !defined( ‘ABSPATH’ ) ) exit;

    // BEGIN ENQUEUE PARENT ACTION
    // AUTO GENERATED – Do not modify or remove comment markers above or below:

    if ( !function_exists( ‘chld_thm_cfg_parent_css’ ) ):
    function chld_thm_cfg_parent_css() {
    wp_enqueue_style( ‘chld_thm_cfg_parent’, trailingslashit( get_template_directory_uri() ) . ‘style.css’, array( ‘bootstrap’,’bootstrap-select’,’smartmenus-bootstrap’,’font-awesome’,’owl-carousel’ ) );
    }
    endif;
    add_action( ‘wp_enqueue_scripts’, ‘chld_thm_cfg_parent_css’, 10 );

    // END ENQUEUE PARENT ACTION

    Is this wrong? Should I copy paste the code you gave me? Is it ok to make changes now to the php file? Because I have designed the website already, will the change in php file change anything?

    I didn’t copy paste any code. I just used the child theme configurator plugin.
    I was told the Kale theme has made a few updates and so there is no need to add any code to the php file if I am using the theme now, but anyone who used it in the past had to make those changes. What do you suggest?

    • This reply was modified 5 years, 6 months ago by burgers.
    • This reply was modified 5 years, 6 months ago by burgers.

    Well, that code NOW is from functions.php file. You had a CSS one before.

    Basically, paste Github code AFTER

    
    // END ENQUEUE PARENT ACTION line.

    Do NOT paste the first line – <?php it already exists in your file.

    Kind regards.

    Thread Starter burgers

    (@burgers)

    Sorry, I didn’t understand. What should I paste and where?

    Paste this code:

    add_action( 'wp_enqueue_scripts', 'kale_child_enqueue_styles' );
    function kale_child_enqueue_styles() {
        
        $parent_style = 'kale-style';
        $deps = array('bootstrap', 'bootstrap-select', 'font-awesome', 'owl-carousel');
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' , $deps);
        
        wp_enqueue_style( 'kale-style-child', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ), wp_get_theme()->get('Version') );
    }
    
    function kale_get_option($key){
        global $kale_defaults;
        
        $parent_theme = get_template_directory();
        $parent_theme_slug = basename($parent_theme);
        $parent_theme_mods = get_option( "theme_mods_{$parent_theme_slug}");
        
        $value = '';
        $child_value = get_theme_mod($key);
        if(!empty($child_value)){
            $value = $child_value;
        }
        else if (!empty($parent_theme_mods) && isset($parent_theme_mods[$key])) {
            $value = $parent_theme_mods[$key];
        } else if (is_array($kale_defaults) && array_key_exists($key, $kale_defaults)) 
            $value = get_theme_mod($key, $kale_defaults[$key]); 
        return $value;
    }
    ?>

    below the line

    
    // END ENQUEUE PARENT ACTION

    in the functions.php file.

    Kind regards.

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Kale child theme home page looks different.’ is closed to new replies.