WordPress 升級 6.4.1 手機版掛掉暫解

想當初換到 WordPress 就是升級方便,點了升級後基本上就不太需要管他,沒想到 6.4.1 版升級後,桌機沒事,手機版直接噴錯誤~~

主要問題是在 Themes Template 端的問題,看起來在 Themes 那邊都多做了一層 inc,然後會需要 template-tags.php 去做其它載入~

大概問題都是下述這些:

  • PHP Fatal error: require(): Failed opening required 'wp-content/themes/twentytwentythree/inc/template-tags.php' in wp-content/themes/twentysixteen/functions.php on line 529
  • PHP Warning: require(wp-content/plugins/wptouch/themes/bauhaus/default/inc/template-tags.php): failed to open stream: No such file or directory in wp-content/themes/twentysixteen/functions.php on line 529

註:上述是 twentysixteen themes 和 WPtouch plugin 這兩個手機版 Theme 都有問題

閱讀全文〈WordPress 升級 6.4.1 手機版掛掉暫解〉

WordPress 使用 Yoast Plugin 造成標題重複出現問題修復

WordPress 使用 Yoast SEO Plugin 主要只是想讓他幫我加些 Meta Tag, ex:

<link rel="canonical" href="https://blog.longwin.com.tw/">
<meta property='og:locale' content='zh_TW'>
<meta property='og:type' content='website'>
...

不知道哪個版本的更新後, 現在居然出現網站名稱重複出現的問題, 如下述:

閱讀全文〈WordPress 使用 Yoast Plugin 造成標題重複出現問題修復〉

將 MT + LifeType 文章轉換到 WordPress 步驟

最早期使用的 Blog 系統是 MT (Movable Type), 後來使用 pLog (LifeType), MT 系統要維護還蠻麻煩的(Spam 太多), 於是趁這次將全部文章都統一倒進 WordPress 裡面, 一併解決.

此轉換需要做下述準備:

  • Export MT 文章 (用系統本身的 Export 功能即可), Export 格式可參考: The Movable Type Import / Export Format
  • Export LifeType 文章 (可見: LifeType 透過 RSS Dump 所有文章 - 這個不一定會用到, 可以先不準備此步驟)
  • 解決圖片、檔案對應 (網址 Rewrite)
  • 解決網址對應的 Rewrite (Category, Article)
    • MT 網址格式: /archives/000590.html
    • LifeType 網址格式: /my_note-unix/2011/03/18/build-git-env-share-over-ssh-2011

閱讀全文〈將 MT + LifeType 文章轉換到 WordPress 步驟〉

為 LifeType 加上 Facebook Like

為 LifeType 加上 Facebook Like, 做法於下述:

  1. vim /var/www/lifetype/templates/Mac-Stripe/postandcomments.template # 加入下述即可.

    {* Facebook Like *}
    <iframe src="http://www.facebook.com/plugins/like.php?href={$url->postPermalink($post)}" scrolling="no" frameborder="0" style="height: 62px; width: 100%" allowTransparency="true"></iframe>

  2. 存檔後, 就可以到網站去看看囉~

LifeType 1.2.11 RSS 標題亂碼修復

LifeType 1.2.11 現在還不適合升級, 等 Mark 通知後再來升級會比較安全, 現在的版本, 會踩到不少地雷. XD

不過 LifeType 1.2.11 版, Apache2 加上 Google mod_pagespeed 後, TinyMCE 不會爆炸, 所以就繼續留著此版本, 把遇到的問題先解決掉就好.

感謝 Sean 回報 RSS 標題會出現亂碼的問題, 追查後, 應該只要改 template (Smarty) 即可.

閱讀全文〈LifeType 1.2.11 RSS 標題亂碼修復〉