wordpress twentytwenty添加右侧边栏

header.php最后加入

		get_template_part( 'template-parts/modal-menu' );
		?><div class="site-wrap"><?php

删除index.php中的

		<?php get_template_part( 'template-parts/footer-menus-widgets' ); ?>

footer.php中<header>标签前加入

		</div>
		<?php get_template_part( 'template-parts/footer-menus-widgets' ); ?>

funtions.php找到下面code

	// Footer #2.
	register_sidebar(
		array_merge(
			$shared_args,
			array(
				'name'        => __( 'Footer #2', 'twentytwenty' ),
				'id'          => 'sidebar-2',
				'description' => __( 'Widgets in this area will be displayed in the second column in the footer.', 'twentytwenty' ),
			)
		)
	);

后面插入

	// Footer #0.
	register_sidebar(
		array_merge(
			$shared_args,
			array(
				'name'        => __( 'Footer #0', 'twentytwenty' ),
				'id'          => 'sidebar-0',
				'description' => __( 'Widgets in this area will be displayed in the second column in the side.', 'twentytwenty' ),
			)
		)
	);
media ( min-width: 1000px ) {
@media ( min-width: 1000px ) {

	#site-wrap {max-width: 100rem; width: 100rem; margin: 0 auto; overflow: hidden; display: block;}
	/* Document Setup ------------------------ */
	#site-content {max-width: 68rem; width: 100%; float: left;}
	/* Helper Classes ------------------------ */
	#site-sidebar {max-width: 30rem; width: 100%; float: right;}

发表评论