WordPress sidebar not align with content

本文介绍了尝试在名为Submate的模板中,为WordPress的Children主题添加右侧边栏的过程。代码示例显示了如何获取侧边栏并将其应用于页面布局,同时考虑了首页和普通页面的不同显示情况。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

它让我发疯,因为我不是代码高手,使用模板\\'submate\\'我试图在 children 主题优势上添加右侧边栏

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

<?php

/**

* This template displays full width pages with a page title.

*

* @package vantage

* @since vantage 1.0

* @license GPL 2.0

*

* Template Name: submate

*/

get_header(); ?>

<?php

//get the sidebar

$avia_config['currently_viewing'] = 'page';

if(is_front_page()) { $avia_config['currently_viewing'] = 'frontpage'; }

get_sidebar();

?>

<?php if(function_exists('bcn_display'))

{

bcn_display();

}?>

<?php while ( have_posts() ) : the_post(); ?>

<?php get_template_part( 'content', 'page' ); ?>

<?php endwhile; // end of the loop. ?>

<?php get_footer(); ?>

非常感谢您的帮助:)

原文地址:http://www.ccttoo.com/html/672.html

本文来自网络,不代表菜鸟教程之家立场,转载请注明出处。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值