固定メニューを追加します。基本メニューは下ですが、上、左、右にも表示できます。
リンク
- 5つのリンク先を指定できます。
- 各リンクのアイコン、URL、テキストのフィルターを提供します。
オプション
- 列数を1~5まで指定できます。
- フォントサイズを px、rem、em で指定できます。
- メニューの高さを px、rem、em で指定できます。
- 行の高さを px、rem、em で指定できます。
- パディングを px、rem、em で指定できます。
- ヘッダーとフッターの重なりを除去するクラスを指定できます。
- テキスト、ボタン、オーバーレイの色を指定できます。
- 表示幅の上限を指定できます。
- css 要素の重ね順を指定できます。
- 上記のオプションのフィルターを提供します。
その他のフィルター
- メニューを消去するフィルターを提供します。
使い方
ライブデモ
アイコン
- Dashicons を指定できます。
カスタマイズ
- テンプレートファイルは、柔軟なカスタマイズを可能にします。
- デフォルトのテンプレートファイルは、
template/fixedbottommenu-template-html.phpとtemplate/fixedbottommenu-template-css.phpです。これを参考に、以下のフィルターを使って別のテンプレートファイルを指定することができます。
/** ==================================================
* Filter for template file of html.
*
*/
add_filter(
'fixed_bottom_menu_generate_template_html_file',
function () {
$wp_uploads = wp_upload_dir();
$upload_dir = wp_normalize_path( $wp_uploads['basedir'] );
$upload_dir = untrailingslashit( $upload_dir );
return $upload_dir . '/tmp/fixedbottommenu-template-html.php';
},
10,
1
);
/** ==================================================
* Filter for template file of css.
*
*/
add_filter(
'fixed_bottom_menu_generate_template_css_file',
function () {
$wp_uploads = wp_upload_dir();
$upload_dir = wp_normalize_path( $wp_uploads['basedir'] );
$upload_dir = untrailingslashit( $upload_dir );
return $upload_dir . '/tmp/fixedbottommenu-template-css.php';
},
10,
1
);
- CSS ファイルは別途設定可能です。以下のフィルターをご覧ください。
/** ==================================================
* Filter for CSS file.
*
*/
add_filter(
'fixed_bottom_menu_css_url',
function () {
$wp_uploads = wp_upload_dir();
$upload_url = $wp_uploads['baseurl'];
if ( is_ssl() ) {
$upload_url = str_replace( 'http:', 'https:', $upload_url );
}
$upload_url = untrailingslashit( $upload_url );
return $upload_url . '/tmp/fixedbottommenu.css';
},
10,
1
);