WordPress のテーマ ファイルで、sidebar-left-slugname.php や sidebar-right-slugname.php とかを使いたい / I want to using such sidebar-left-slugname.php or sidebar-right-slugname.php… in a WordPress theme file

WordPress のテーマ ファイルで、sidebar-left-slugname.php や sidebar-right-slugname.php とかを使いたかったのでやってみたメモ…無駄かな…?

header.php などで、変数 global $Slug を定義してスラッグ名を入れておく

functions.php で、sidebar-left-slugname.php や sidebar-right-slugname.php を読み込む&常時使用するサイドバーを定義

テーマ内のサイドバーを表示している部分、dynamic_sidebar が使われているところを下記のような感じにテーマに合わせて変更する

スラッグ名で使用するサイドバーファイルをこんな感じに作成する sidebar-left-slugname.php

ショートコードの出力をキャッシュしてみる / Shortcode output be cached, WordPress

 

Page Builder by SiteOrigin のメモ / tips

カラムを左右入れ替える / Swap columns left and right

Row > CSS Style

カラムを横並びのままにする / Keep columns side by side

Row > Row Class

SASS / CSS

 

プラグイン Recent Posts Widget With Thumbnails にギャラリーからも画像を見つける機能を追加する / Add the ability to find images from the gallery, too

/wp-content/plugins/recent-posts-widget-with-thumbnails/recent-posts-widget-with-thumbnails.php:

指定したウィジェットを WordPress の管理画面に配置し、その中で Youtube ビデオの縦横比を保つ / Placing specific widgets to WordPress Admin Screen and keep the Youtube video aspect ratio within

/wp-content/themes/my-theme/functions.php: