Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter ardan

    (@ardan)

    marked as solved

    Thread Starter ardan

    (@ardan)

    okay, got it working now..
    I had to change the path somehow.. didnt know how..
    but figured it out..

    I included

    define('MD_CHILDTHEME_NAME', 'flex_child');
    define('MD_CHILDTHEME_DIR', get_stylesheet_directory());
    define('MD_CHILDTHEME_URI', get_stylesheet_directory_uri());

    and pointed to the correct theme_path ??

    wp_enqueue_style( MD_THEME_NAME.'-generate', <strong>MD_CHILDTHEME_URI</strong> . '/assets/css/css-generate.php', '', '', 'all' );
    Thread Starter ardan

    (@ardan)

    I know exactly what css statement I need to edit… so, no worries there

    My child_theme/functions.php already only contained this:

    // Remove the default Thematic blogtitle function
    function remove_md_theme_scripts() {
        remove_action('wp_enqueue_scripts','md_theme_scripts',3);
    }
    // Call 'remove_thematic_actions' (above) during WP initialization
    add_action('init','remove_md_theme_scripts');
    
    if(!function_exists('md_theme_scripts_child')) {
    
        function md_theme_scripts_child() {
            wp_enqueue_style( MD_THEME_NAME, get_stylesheet_uri(), '', '', 'all' );
    
            wp_enqueue_style( MD_THEME_NAME.'-generate', MD_THEME_URI . '/assets/css/css-generate.php', '', '', 'all' );
            wp_enqueue_style( MD_THEME_NAME.'-custom', MD_THEME_URI . '/assets/css/custom.css', '', '', 'all' );
    
            wp_enqueue_script( MD_THEME_NAME.'-bootstrap', MD_THEME_URI.'/assets/js/vendor/bootstrap.js', array('jquery'), NULL, true );
    
            wp_enqueue_script( MD_THEME_NAME.'-plugins', MD_THEME_URI.'/assets/js/vendor/plugins.js', array('jquery'), NULL, true );
            wp_enqueue_script( MD_THEME_NAME, MD_THEME_URI.'/assets/js/theme.js', array('jquery'), NULL, true );
    
            if( is_singular() && comments_open() ){
                wp_enqueue_script( 'comment-reply' );
            }
        }
    	add_action('wp_enqueue_scripts','md_theme_scripts_child', 3);

    But wordpress still only uses the css-generate.php from “parent_theme/assets/css/css-generate.php”

    this is the original part of the orig parent functions.php

    if(!function_exists('md_theme_scripts')) {
    
        function md_theme_scripts() {
            wp_enqueue_style( MD_THEME_NAME, get_stylesheet_uri(), '', '', 'all' );
    
            wp_enqueue_style( MD_THEME_NAME.'-generate', MD_THEME_URI . '/assets/css/css-generate.php', '', '', 'all' );
            wp_enqueue_style( MD_THEME_NAME.'-custom', MD_THEME_URI . '/assets/css/custom.css', '', '', 'all' );
    
            wp_enqueue_script( MD_THEME_NAME.'-bootstrap', MD_THEME_URI.'/assets/js/vendor/bootstrap.js', array('jquery'), NULL, true );
    
            wp_enqueue_script( MD_THEME_NAME.'-plugins', MD_THEME_URI.'/assets/js/vendor/plugins.js', array('jquery'), NULL, true );
            wp_enqueue_script( MD_THEME_NAME, MD_THEME_URI.'/assets/js/theme.js', array('jquery'), NULL, true );
    
            if( is_singular() && comments_open() ){
                wp_enqueue_script( 'comment-reply' );
            }
        }
        add_action( 'wp_enqueue_scripts', 'md_theme_scripts' );
    
    }

    Thread Starter ardan

    (@ardan)

    Hey Thanks for your answer!
    The instructions said, the files in the child theme REPLACE the once in the parent theme..

    What do I have to do, if I want wordpress to load ONLY the file

    child_theme\assets\css\css-generate.php
    and not
    parent_theme\assets\css\css-generate.php
    ?

    What do I need to change in the child_theme functions.php ? (without touching the parent theme)

    it seems you figured it out? what was the problem?

    mine stopped working as well..

    Thread Starter ardan

    (@ardan)

    Hey Tobias,

    thanks for the very quick response!
    Too bad you haven’t had the chance to integrate it yet..
    Will have to try to find the image withing like hundred of images …

    Any idea on when you might be able to integrate the new library?
    weeks, months?

    best
    daniel

Viewing 6 replies - 1 through 6 (of 6 total)