SWELLで辞書サイト2

WordPressに関するメモ書き。

 

からのつづき。

 

ブロックパーツ「投稿リスト」の並び順を「五十音順」にしたい。

SWELLのソースコードをカスタマイズするためにどこをいじったらいいか。

あたりをつけるためGREPしてみた。

cd (swell.zipを解凍したディレクトリ)
find ./ -type f | xargs grep "orderby"

 

その結果がこちら

.//classes/SWELL_THEME/Parts/Post_List.php:			'orderby'             => 'date',
.//classes/SWELL_THEME/Parts/Post_List.php:			$q_args['orderby']  = 'post__in';
.//classes/SWELL_THEME/Parts/Post_List.php:			$orderby = $block_args['orderby'];
.//classes/SWELL_THEME/Parts/Post_List.php:			if ( 'pv' === $orderby ) {
.//classes/SWELL_THEME/Parts/Post_List.php:				$q_args['orderby']  = 'meta_value_num';
.//classes/SWELL_THEME/Parts/Post_List.php:			} elseif ( 'rand' === $orderby ) {
.//classes/SWELL_THEME/Parts/Post_List.php:				$q_args['orderby'] = 'rand';
.//classes/SWELL_THEME/Parts/Post_List.php:				$q_args['orderby'] = $orderby;
.//classes/Legacy_Widget/SWELL_Popular_Posts.php:			'orderby'             => 'meta_value_num',
.//classes/Data/Default_Settings.php:			'related_post_orderby'    => 'date',
.//classes/Data/Default_Settings.php:			'ps_orderby'              => 'rand',
.//archive-term.php:								'orderby'             => 'meta_value_num',
.//parts/top/post_slider.php:$the_orderby = $SETTING['ps_orderby'];
.//parts/top/post_slider.php:if ( 'meta_value_num' === $the_orderby ) {
.//parts/top/post_slider.php:	$q_args['orderby']  = 'meta_value_num';
.//parts/top/post_slider.php:	$q_args['orderby'] = $the_orderby;
.//parts/single/related_post_list.php:	'orderby'             => SWELL_Theme::get_setting( 'related_post_orderby' ),
.//parts/home_content.php:					'orderby'             => 'meta_value_num',
.//lib/customizer/top/post_slider.php:Customizer::add( $section, 'ps_orderby', [
.//lib/customizer/single_page/after_article.php:Customizer::add( $section, 'related_post_orderby', [
.//lib/gutenberg/block/post-list.php:		'orderby'        => $attrs['orderby'],
.//lib/hooks/admin_display.php:	if ( isset( $vars['orderby'] ) && 'swell_pv_ct' === $vars['orderby'] ) {
.//lib/hooks/admin_display.php:				'orderby'  => 'meta_value_num',
.//build/blocks/post-list/index.js:,	d=[{label:(0,a.__)("Card type","swell"),value:"card"},{label:(0,a.__)   
.//author.php:								'orderby'             => 'meta_value_num',
.//tmp/popular.php:					'orderby'             => 'meta_value_num',
.//src/gutenberg/blocks/post-list/block.json:        "orderby": {

 

ファイル一覧

  • .//classes/SWELL_THEME/Parts/Post_List.php
  • .//classes/Legacy_Widget/SWELL_Popular_Posts.php
  • .//classes/Data/Default_Settings.php
  • .//archive-term.php
  • .//parts/top/post_slider.php
  • .//parts/single/related_post_list.php
  • .//parts/home_content.php
  • .//lib/customizer/top/post_slider.php
  • .//lib/customizer/single_page/after_article.php
  • .//lib/gutenberg/block/post-list.php
  • .//lib/hooks/admin_display.php
  • .//build/blocks/post-list/index.js
  • .//author.php
  • .//tmp/popular.php
  • .//src/gutenberg/blocks/post-list/block.json

 

カスタマイズするために、修正を入れる箇所は上記のどれかのはず。

(つづく)

うさ吉

群馬出身埼玉在住。
趣味(写真や小旅行)についてつらつらと書き綴ってます。

うさ吉をフォローする
WordPress
シェアする
うさ吉をフォローする
うさログ

コメント