problem with stax’s child theme

Home Forums Technical Theme Support STAX Theme problem with stax’s child theme

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #468597
    alexis beaumont
    Participant

    Hello,
    i’ve created stax child theme from theme demo

    organic-staxchild/style.css:
    /*
    Theme Name: musicstore63
    Theme URI:
    Author: Stephane Jallade
    Author URI:
    Description:
    Requires at least: 6.7
    Tested up to: 6.7
    Requires PHP: 5.7
    Version:
    License: GNU General Public License v2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    Template: Template: organic-stax
    Text Domain: musicstore63
    Tags:
    */

    i’ve created also functions.php :
    <?php
    // fonctions du thème
    // CSS pour le back-office et autre
    function gn_empty_setup() {

    // Rendre le thème traduisible
    load_theme_textdomain( ‘fse-base-gn-empty’, get_template_directory() . ‘/languages’ );

    // Ajouter le CSS du front pour le back
    add_editor_style(
    array(
    ‘./style.css’,
    )
    );

    // Supprimer les compositions par défaut
    remove_theme_support( ‘core-block-patterns’ );

    }
    add_action( ‘after_setup_theme’, ‘gn_empty_setup’ );

    // Enqueue le CSS pour le front-office
    add_action( ‘wp_enqueue_scripts’, ‘gn_empty_enqueue_style_sheet’ );
    function gn_empty_enqueue_style_sheet() {

    wp_enqueue_style( ‘organic-stax’, get_template_directory_uri() . ‘/style.css’, array(), wp_get_theme()->get( ‘Version’ ) );
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘child-style’,
    get_stylesheet_directory_uri() . ‘/style.css’,
    array(‘parent-style’)
    );
    }

    But i have problem : all the header, footer etc. not being displayed, despite them being shown when using the full-site editor.

    I’ve already created child themes on full site editing templates, but now with stax child theme I can’t display the menus and footer.

    thanks for your help
    best regards

    #468826
    alexis beaumont
    Participant

    hello,
    is there anyone who could help me ?
    best regards

    #468897
    David Morgan
    Keymaster

    Hi Alexis,

    Thanks for reaching out and using STAX!

    How are you creating a child theme? Some customers have had luck using the following plugin for child theme creation: https://wordpress.org/plugins/child-theme-configurator/

    Additionally, why are you creating a child theme? I ask, because child themes are typically unnecessary for newer block theme like STAX. Using a block theme, template customizations can always be reverted, and won’t be overwritten with theme updates. Additionally, any extra functionality can typically be added using a plugin like Code Snippets rather than using an entirely separate child theme.

    Thanks!

    #468956
    alexis beaumont
    Participant
    This reply has been marked as private.
    #469006
    David Morgan
    Keymaster

    Hi Alexis,

    I apologize for the delay. I’m looking into the header and footer display for child themes.

    However, it should be noted that your reason for creating a child theme does warrant the creation of a child theme. Custom CSS can be added using the Additional CSS section of the Customizer or Editor. Or, you can use a plugin like Code Snippets to add custom CSS, https://wordpress.org/plugins/insert-headers-and-footers/

    Using any of those options will allow for your custom code to reamin unaffected by theme updates without the overhead and issues that child themes cause. Most information regarding the creation of child themes is outdated and unnecessary as it relates to newer themes.

    I hope this helps.

    Thanks!

    #469017
    alexis beaumont
    Participant

    hello
    thanks a lot for your answer. The stax version 1.6 solves the child theme problem. Great !
    yes, I can add custom styles.
    If there were only styles to add, I wouldn’t create a child theme.
    But I also want to change the default color palette and have specific fluid sizes.
    and I don’t think I can do it any other way than in a theme.json file different from the one proposed in the parent theme.
    That’s why I want a child theme
    is it possible to customize the theme.json file without creating a child theme?
    thanks

    Best regards
    Alexis

    #469073
    David Morgan
    Keymaster

    Hi Alexis,

    Glad to hear it’s working properly for you now!

    You should not need to edit the theme.json file directly in order to make your desired changes. All the values for the theme.json file can be modified in the Site Editor without modifying any code directly. This can be done in the global styles section of the Editor. Color palettes, fonts, sizes, spacing, layout widths, and style options for all blocks can be changed in the Editor, illustrated in the attached screenshots.

    I hope this helps. Thanks!

    Attachments:
    You must be logged in to view attached files.
    #469138
    alexis beaumont
    Participant

    Hi David,
    I’m sorry but I still have a little problem with the stax child theme: some template parts don’t display natively on the page templates concerned:
    – banner image
    – shop filter
    – footer link
    I have to add them manually
    is it possible to correct this?
    Thanks a lot
    Best regards

    #469148
    Charles
    Participant

    Hi Alexis, can you please send the link to your website? Thank you

    #469150
    Charles
    Participant

    Hi Alexis, disregard that message we got your website 🙂

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