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;}

除非注明,否则均为芯片版图原创文章,转载必须以链接形式标明本文链接

本文链接:https://www.chiplayout.net/wordpress-twentytwenty%e6%b7%bb%e5%8a%a0%e5%8f%b3%e4%be%a7%e8%be%b9%e6%a0%8f.html

发表评论

您的电子邮箱地址不会被公开。