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修复 #753

Merged
merged 5 commits into from
Jun 23, 2023

Conversation

kanodaisuki
Copy link
Contributor

详见commits

错误的样式:https://github.com/mirai-mamori/Sakurairo/assets/79365334/12baafe6-d80c-4bb7-84f3-677ef66a050c

get_next_post()或get_previous_post()可选的参数见:https://developer.wordpress.org/reference/functions/get_next_post/

get_next_post($excluded_terms = $classify_display_id)缺少了“in_same_term”参数,如果$classify_display_id的值不为空,get_next_post()会将“$excluded_terms”的值作为“in_same_term”,即”$in_same_term  =  true”。
这会导致get_next_post()函数只会在同分类中检索文章,且没有排除已设置的分类。

get_previous_post()函数同上。
在文章页面中,基于对标题跳转的辅助支持,在标题前加了一个伪元素,并在css中进行了样式定义。
上面的特性,并不适用于说说模板,因为说说不需要目录支持。
异常的样式是说说的标题前面有非预期的“空行”伪元素占位,如图:https://github.com/mirai-mamori/Sakurairo/assets/79365334/6f612ace-4de0-400f-8b62-cc4b0cac6e77

修正方式是对该伪元素进行隐藏,且只针对说说模板页面,对文章的标题跳转无影响。
https://github.com/mirai-mamori/Sakurairo/assets/79365334/5e1a1da9-777a-44af-aab6-7024e5422394
@mirai-mamori mirai-mamori merged commit 6df7761 into mirai-mamori:preview Jun 23, 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

Successfully merging this pull request may close these issues.

2 participants