サイト内検索
og:locale 設定 | Cocoonテーマに関する質問 | Cocoon フォーラム

Topic starter2022年7月22日 18:43
I run a Korean Wordpress site with a cocoon theme.
I am very poor at Wordpress.
Thank you so much for revealing a great theme.
If you look at the source of the single page,
the og:locale tag appears like this:
Can’t I replace "ja_JP" with ="en_KR"?
Thank you so much.
<!-- OGP -->
<meta property="og:locale" content="ja_JP">
<meta property="og:locale" content="ko_KR">
This topic was modified 3週間前 2回 by good5810
2022年7月22日 19:24
good5810さん
以下リンクのファイルを、親テーマから子テーマにコピーし、該当箇所を変更するのが手っ取り早いと思います。
I think it is quick to copy the file linked below from the parent theme to the child theme and change the relevant part.
https://github.com/yhira/cocoon/blob/6da2f6e9aebee9157f82d4da176708b672b1785e/tmp/header-ogp.php#L79
わいひら 件のいいね!
2022年7月22日 20:09
どうやらja_JPとかko_KRを直接取得する関数は存在しないようですね。
「サイト言語」で「韓国語」となっている場合は、ko_KRとなるように修正してみました。
よろしければ以下のファイルで試してみてください。
------------------------------------------------
https://github.com/yhira/cocoon
開発中の最新ファイルをダウンロードする場合は、上記ページのダウンロードボタンからzipファイルをダウンロードしてください。
WordPressでの手動アップデート方法はこちら
https://wp-cocoon.com/manual-update-of-cocoon-theme/
------------------------------------------------
Apparently there is no function to get ja_JP or ko_KR directly.
If the "site language" is "Korean", I modified it to be ko_KR.
If you like, please try it with the following file.
------------------------------------------------
https://github.com/yhira/cocoon
To download the latest file under development, download the zip file from the download button on the above page.
Click here for manual update method in WordPress
https://wp-cocoon.com/manual-update-of-cocoon-theme/
------------------------------------------------
This post was modified 3週間前 by わいひら
2022年7月23日 22:29
ご確認いただきありがとうございます。