Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 文章页公告无法关闭 #47

Closed
wyj5211 opened this issue Jan 27, 2023 · 4 comments
Closed

[Bug]: 文章页公告无法关闭 #47

wyj5211 opened this issue Jan 27, 2023 · 4 comments

Comments

@wyj5211
Copy link
Contributor

wyj5211 commented Jan 27, 2023

是否从release页下的主题? | Is the theme download from Release Page?

是 (Yes)

使用的 Butterfly 版本? | What version of Butterfly are you use?

1.7.3

是否修改过主题文件? | Has the theme files been modified?

不是 (No)

使用的浏览器? | What browse are you using?

Chrome

博客的运行环境? | What the running environment of the blog?

linux|php8.0+|typecho1.2|sqlite|nginx

问题描述 | Describe the bug

typecho用的是1.2 开发版
在后台已关闭侧边栏显示公告,文章页的侧边栏显示也全部关闭,可在文章页还是能看见公告,但在主页就没有
这是我的文章页 这是主页
另附后台设置截图
27-1-2023-11483-blog-wyj5211-me.jpg
文章页截图
27-1-2023-114624-blog-wyj5211-me.jpg

@wyj5211 wyj5211 closed this as completed Jan 27, 2023
@wyj5211 wyj5211 reopened this Jan 27, 2023
@wyj5211
Copy link
Contributor Author

wyj5211 commented Jan 27, 2023

(前面的closed是按错的)
还有文章侧边栏显示设置那里 显示网站咨询 打错字了

@wehaox
Copy link
Owner

wehaox commented Jan 29, 2023

在post_sidebar.php中,公告部分添加php判断

<?php if (!empty($this->options->sidebarBlock) && in_array('ShowAnnounce', $this->options->sidebarBlock)): ?> 
    <div class="card-widget card-announcement"><div class="item-headline">
        <i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div>
    <div class="announcement_content"><?php $this->options->announcement() ?></div></div>
<?php endif; ?>

@wyj5211
Copy link
Contributor Author

wyj5211 commented Feb 4, 2023

在post_sidebar.php中,公告部分添加php判断

<?php if (!empty($this->options->sidebarBlock) && in_array('ShowAnnounce', $this->options->sidebarBlock)): ?> 
    <div class="card-widget card-announcement"><div class="item-headline">
        <i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div>
    <div class="announcement_content"><?php $this->options->announcement() ?></div></div>
<?php endif; ?>

测试成功

@wehaox
Copy link
Owner

wehaox commented Feb 21, 2023

新版本已修复

@wehaox wehaox closed this as completed Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants