WordPressの検索結果ページの一覧をカスタムフィールド値で五十音順ソートするタグ
WordPressの検索結果ページの一覧をカスタムフィールド値で五十音順ソートするタグ
WordPressの検索結果ページの一覧をカスタムフィールド値で五十音順ソートするタグ
■WordPress
WordPress 日本語版
■スクリプト
PHP
■データベース
MySQL
■作業
WordPressの検索結果ページの一覧をカスタムフィールド値で五十音順ソート
■WordPressの検索結果ページの一覧をカスタムフィールド値で五十音順ソートするタグ
テーマの「search.php」から下記のタグを探す
<?php while (have_posts()) : the_post(); ?>
上記の上に下記を入力
<?php query_posts('showposts=-1&orderby=meta_value&meta_key=yomi&order=asc'); ?>
※カスタムフィールド「yomi」でソートする場合