0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WordPressのCocoonを使ったスマホメニュー生成の覚書

Posted at

概要

WPの案件でスマホのメニューに関して、画面がスライドすると表示されるメニューについて
Cocoonの場合は簡単に出来るようになっていたが、忘れてしまうのでメモ

スマホフッターメニューのサンプル

image.png
上記のようなメニューにしたい。

管理画面でのメニューの作成

管理画面 > 外観 > メニューから新たなメニューを作成を選択する。
image.png
上の画像の「新しいメニューを作成しましょう」のリンクをクリック
新しいメニュー作成の名前を仮に「モバイルフッターメニュー」として保存するとメニュー編集が出来るようになる。

メニュー編集が可能になったら「カスタムリンク」を開きメニューを追加する
image.png

このURL部分に利用可能なショートコードが存在する。
参考URL: https://wp-cocoon.com/mobile-footer-menu/

サンプルだと以下のようにする

URL リンク文字列
#menu メニュー
#home ホーム
#search 検索
#top トップ
#sidebar サイドバー

この他にも参考URLを参照すれば様々なメニューをショートコードで表示する事が可能となる。
スマホファーストのサイトの場合はハンバーガーメニューにする等要望があるため、対応出来るようにしておく。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?