追格小程序小编之前写过一篇《为WordPress页面(单页)链接添加固定的父级目录》,文章中也介绍了添加html后缀问题,今天小编再发一篇页面url链接添加.html后缀教程。
WordPress单页面url链接是不能设置 .html 这种后缀,就算手动编辑固定链接,添加.html也会被转码为“-html”形式,我们先看看效果:
我们只需将下面代码放到当前WordPress主题functions.php文件内即可:
add_action('init', 'html_page_permalink', -1);
function html_page_permalink() {
global $wp_rewrite;
if ( !strpos($wp_rewrite->get_page_permastruct(), '.html')){
$wp_rewrite->page_structure = $wp_rewrite->page_structure . '.html';
}
}
然后进入WordPress后台设置固定链接中,重新保存一次设置即可生效。
-
追格小程序建圈、发帖、商城发布商品报错 Warning: Undefined variable $result in追格小程序建圈、发帖、商城发布商品报错Warning: Undefined variable $result in /www/wwwroot/xly/wp-content/plugins/zhuige-xcx/public/class-zhuige-xcx-public.php on line 159
-
【重要通知】追格小程序更新提示因uni组件更新,追格小程序部分模块样式出现异常。我们已定位问题并正优化中,给您带来不便敬请谅解。感谢支持与理解!追格团队将持续努力,优化产品体验,期待更快与您相见。
-
微信小程序打开任意公众号文章 wx.openOfficialAccountArticlewx.openOfficialAccountArticle是微信小程序通过小程序打开任意公众号文章api,不包括临时链接等异常状态下的公众号文章,必须有点击行为才能调用成功。
-
Loco Translate 一款专为WordPress设计的翻译插件WordPress Loco Translate是一款专为WordPress用户设计的翻译插件,它简化了主题和插件的多语言翻译过程。
-
追格小程序V2.5.0更新发布追格小程序V2.5.0版本的更新,我们没给大家添太多新花样,主要是把“内功”练好了。我们认真检查了上一版里那些组件之间的小摩擦,一点点地调整、优化,搞定了超过40多个小地方。这样一来,小程序跑起来就更顺畅了,大家用起来也会感觉更舒服、更顺手。这次虽然没大张旗鼓,但确实是让产品站得更稳、更可靠了。
-
WordPress后台待审文章显示气泡提示的方法之前小编分享过一篇《WordPress 后台菜单添加 badge-红点提示(气泡通知)》的文章,今天我简单说说待审文章(为全部文章类型显示待审角标提示)的气泡提示如何操作。
暂无评论,抢个沙发...