Christmas Sale | Flat 20% OFF on Lifetime & All Themes Package. Use coupon code XMAS2024 Buy Now

WordPress Website Templates

Find Professional WordPress themes Easy and Simple to Setup

inner banner

Prayer Pro Theme – Child Theme Setup

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #37831
    Mina Han
    Participant

    Hi,

    I created a child theme to do some custom development. For some reason, the generated code in functions.php is causing the entire parent prayer-pro style to disappear. Can you please take a look and see what is missing/wrong? I’m trying to get the parent theme style.css file to load, and override any styles using my child theme style.css file

    <?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_locale_css’ ) ):
    function chld_thm_cfg_locale_css( $uri ){
    if ( empty( $uri ) && is_rtl() && file_exists( get_template_directory() . ‘/rtl.css’ ) )
    $uri = get_template_directory_uri() . ‘/rtl.css’;
    return $uri;
    }
    endif;
    add_filter( ‘locale_stylesheet_uri’, ‘chld_thm_cfg_locale_css’ );

    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() );
    }
    endif;
    add_action( ‘wp_enqueue_scripts’, ‘chld_thm_cfg_parent_css’, 10 );

    // END ENQUEUE PARENT ACTION
    ?>

    #37832
    Mina Han
    Participant

    Sorry, updating code (above was a hotfix, but it’s just ignoring the child theme in general):

    <?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_locale_css’ ) ):
    function chld_thm_cfg_locale_css( $uri ){
    if ( empty( $uri ) && is_rtl() && file_exists( get_template_directory() . ‘/rtl.css’ ) )
    $uri = get_template_directory_uri() . ‘/rtl.css’;
    return $uri;
    }
    endif;
    add_filter( ‘locale_stylesheet_uri’, ‘chld_thm_cfg_locale_css’ );

    if ( !function_exists( ‘child_theme_configurator_css’ ) ):
    function child_theme_configurator_css() {
    wp_enqueue_style( ‘chld_thm_cfg_child’, trailingslashit( get_stylesheet_directory_uri() ) . ‘style.css’, array( ‘prayer-pro-basic-style’,’prayer-pro-editor-style’,’prayer-pro-base-style’,’prayer-pro-nivo-style’,’prayer-pro-fontawesome-all-style’,’prayer-pro-animation’,’prayer-pro-hover’,’prayer-pro-hover-min’,’prayer-pro-testimonialslider-style’,’prayer-pro-responsive-style’,’prayer-pro-owl-style’,’prayer-pro-mixitup-style’,’prayer-pro-prettyphoto-style’,’prayer-pro-flexiselcss’,’prayer-pro-youtube-popup’ ) );
    }
    endif;
    add_action( ‘wp_enqueue_scripts’, ‘child_theme_configurator_css’, 10 );

    // END ENQUEUE PARENT ACTION

    #37838
    Grace Support
    Keymaster

    Hi,

    The child theme contains two file style.css and functions.php

    To create a child theme from “The Church” parent theme:

    In child theme style.css file
    Add:

    Template: the-church
    Text Domain: the-church-child

    (Template name will be the Text Domain of parent theme and change Text Domain)

    Parent Theme CSS:

    Version: pro 1.2
    License: GNU General Public License version 2
    License URI: license.txt
    Text Domain: the-church

    Child Theme CSS:

    Template: the-church
    Version: pro 1.0
    License: GNU General Public License version 3
    License URI: license.txt
    Text Domain: the-church-child

    If you are getting any problem, please send your website URL and WordPress admin login details at [email protected] so we can make child theme on your website.

    Regards
    Grace Themes

    #41327
    Lucius Douglas
    Participant

    To be honest, Grace Themes support should develop a plugin that can create a child theme of an installed Grace Theme theme that retains all settings of the parent theme but any changes are only made for the child theme. The issue with using some of the WordPress child theme creation plugins is they simply don’t work for Grace Theme themes.

    Child themes are ‘tremendously’ important for ongoing development of websites. After 2-4 years, a client may want a new look to the website. The ability to make changes to a child theme while the current website uses a parent theme provides website administrators the ability to make changes without affecting the current website. Seeing a website in a child theme can be accomplished by using a URL parameter.

    Just a thought.

    #41332
    Grace Support
    Keymaster

    We don’t have a plugin to create a child theme but you can manually create a child theme.

    #41334
    Lucius Douglas
    Participant

    The issue with the process of created a child theme is that all settings are lost. You have a fairly complicated theme which, regretfully, on moving from a development domain to the live domain tends to revert to your sample content which is awful.

    I sure wish you provided the ability to completely remove all sample content and/or have a setting to ‘never’ revert the theme.

    #41335
    Grace Support
    Keymaster

    Ok, we will look into thiis

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.