2023年4月19日
2024年8月28日
在所有WordPress文章底部添加自定义内容
有时候,你可能需要在所有文章底部添加自定义内容,可以将下面的代码添加到主题的 functions.php 文件中: //在所有文章底部添加自定义内容 function wpkj_add_after_post_content($content) { if(!is_feed() && !is_home() && is_singular() && is_m……
2023年3月31日
2024年8月28日
移除 WordPress 菜单输出的多余的CSS选择器id或class
现在大多数的WordPress主题都使用 wp_nav_menu() 来添加菜单,这个函数默认会输出很多CSS选择器,比如下面的代码: <li id="menu-item-6" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page……
2023年3月31日
近期评论