100,
'width' => 400,
'flex-height' => true,
'flex-width' => true,
) );
}
add_action( 'after_setup_theme', 'aem_slate_custom_logo_setup' );
// Add support for custom menus
function aem_slate_register_menus() {
register_nav_menus( array(
'primary' => esc_html__( 'Primary Menu', 'aem-slate' ),
) );
}
add_action( 'init', 'aem_slate_register_menus' );
// Add widget areas
function aem_slate_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'aem-slate' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here to appear in the sidebar.', 'aem-slate' ),
'before_widget' => '',
'before_title' => '
',
) );
}
add_action( 'widgets_init', 'aem_slate_widgets_init' );
// Custom comment callback
function aem_slate_comments_callback( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
?>
id="comment-">
add_theme_support( "title-tag" );
function theme_prefix_wp_body_open() {
do_action( 'wp_body_open' );
}
add_action( 'wp_body_open', 'theme_prefix_wp_body_open' );
// Ajouter la prise en charge des flux RSS (automatic-feed-links)
add_theme_support( 'automatic-feed-links' );
add_theme_support( "wp-block-styles" );
add_theme_support( "align-wide" );
add_editor_style( 'editor-style.css' );
function enqueue_comment_reply_script() {
wp_enqueue_script( 'comment-reply' );
}
add_action( 'wp_enqueue_scripts', 'enqueue_comment_reply_script' );
add_theme_support( "responsive-embeds" );
add_theme_support( "html5", array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) );
add_theme_support( "custom-header", array( 'default-image' => '', 'width' => 1200, 'height' => 300, 'flex-height' => true ) );
add_theme_support( "custom-background", array( 'default-color' => 'ffffff' ) );
add_theme_support( "post-thumbnails" );
function my_theme_enqueue_scripts() {
wp_enqueue_script( 'custom-scripts', get_template_directory_uri() . '/scripts.js', array(), '1.0', true );
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_scripts' );