etcskel-32m/functions.php

48 lines
1.6 KiB
PHP
Raw Normal View History

2022-11-29 22:05:57 +00:00
<?php
function etcskel32m_enqueue_styles() {
2022-12-02 18:14:59 +00:00
$parenthandle = 'parent-style';
$theme = wp_get_theme();
$child_directory = get_stylesheet_directory_uri();
2022-11-29 22:05:57 +00:00
wp_enqueue_style( $parenthandle,
get_template_directory_uri() . '/style.css',
array(),
$theme->parent()->get( 'Version' )
);
// make child style
2022-11-29 22:05:57 +00:00
wp_enqueue_style( 'child-style',
get_stylesheet_uri(),
array( $parenthandle ),
$theme->get( 'Version' )
);
// fonts
2022-12-02 18:14:59 +00:00
wp_enqueue_style( '32m-fonts', $child_directory . '/assets/fonts/ConcourseOT/concourseot.css', false );
wp_enqueue_style( '32m-main-css', $child_directory . '/assets/css/main.css', array(), false );
2022-11-29 22:05:57 +00:00
}
add_action( 'wp_enqueue_scripts', 'etcskel32m_enqueue_styles', 99);
2022-11-29 22:05:57 +00:00
function etcskel32m_widgets_init() {
register_sidebar( array(
'name' => __( 'Footer Widgets', 'etcskel32m' ),
'id' => 'footer-widgets',
'description' => __( 'Add widgets here to appear in your footer area.', 'etcskel32m' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
register_sidebar( array(
'name' => __( 'Header Widgets', 'etcskel32m' ),
'id' => 'header-widgets',
'description' => __( 'Add widgets here to appear in your footer area.', 'etcskel32m' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'etcskel32m_widgets_init' );
?>