Home Forums WoodMart support forum How to add inc folder in child theme

How to add inc folder in child theme

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #495996

    mostafa20946
    Participant

    hello
    how to load inc folder in child theme?

    #496023

    Artem Temos
    Keymaster

    Hello,

    This folder can’t be overridden in the child theme. If you want to customize a particular PHP function, you can copy it to the functions.php file in the child theme and apply your changes there.

    Kind Regards

    #496028

    mostafa20946
    Participant

    thank you for answer,
    how to add item array in standard-fonts.php with function.php child theme?

    #496040

    Artem Temos
    Keymaster

    Currently, there are no filters there. But we will add it in our next update. As for now, you can replace that file code with the following one and use a hook called woodmart_get_standard_fonts in your child theme to override that array

    <?php
    if ( ! defined( 'WOODMART_THEME_DIR' ) ) {
    	exit( 'No direct script access allowed' );
    }
    
    return apply_filters(
    	'woodmart_get_standard_fonts',
    	array(
    		'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif' => 'System font stack',
    		'Arial, Helvetica, sans-serif'            => 'Arial, Helvetica, sans-serif',
    		'\'Arial Black\', Gadget, sans-serif'     => '\'Arial Black\', Gadget, sans-serif',
    		'\'Bookman Old Style\', serif'            => '\'Bookman Old Style\', serif',
    		'\'Comic Sans MS\', cursive'              => '\'Comic Sans MS\', cursive',
    		'Courier, monospace'                      => 'Courier, monospace',
    		'Garamond, serif'                         => 'Garamond, serif',
    		'Georgia, serif'                          => 'Georgia, serif',
    		'Impact, Charcoal, sans-serif'            => 'Impact, Charcoal, sans-serif',
    		'\'Lucida Console\', Monaco, monospace'   => '\'Lucida Console\', Monaco, monospace',
    		'\'Lucida Sans Unicode\', \'Lucida Grande\', sans-serif' => '\'Lucida Sans Unicode\', \'Lucida Grande\', sans-serif',
    		'\'MS Sans Serif\', Geneva, sans-serif'   => '\'MS Sans Serif\', Geneva, sans-serif',
    		'\'MS Serif\', \'New York\', sans-serif'  => '\'MS Serif\', \'New York\', sans-serif',
    		'\'Palatino Linotype\', \'Book Antiqua\', Palatino, serif' => '\'Palatino Linotype\', \'Book Antiqua\', Palatino, serif',
    		'Tahoma,Geneva, sans-serif'               => 'Tahoma, Geneva, sans-serif',
    		'\'Times New Roman\', Times,serif'        => '\'Times New Roman\', Times, serif',
    		'\'Trebuchet MS\', Helvetica, sans-serif' => '\'Trebuchet MS\', Helvetica, sans-serif',
    		'Verdana, Geneva, sans-serif'             => 'Verdana, Geneva, sans-serif',
    	)
    );
    #496083

    mostafa20946
    Participant

    add code in child theme and not load my custom font in theme option, loaded default font.

    #496099

    mostafa20946
    Participant

    I understand, add code in standard-fonts.php and add_action in child theme for load my fonts.
    thank you.

    #496192

    Artem Temos
    Keymaster

    Hello,

    Yes, we are glad that you sorted it out! Feel free to contact us if you have any further questions.

    Kind Regards

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘How to add inc folder in child theme’ is closed to new replies.