// kiso-seminor.php
// ■ 案A 今のまま get_posts + foreach で回すなら
the_title( $post->ID );
のように、投稿ID を渡してください。わたしていないので全部表示中のページの情報になってます。 ACFの関数は
| <!-- wp:vk-blocks/spacer {"pc":40,"tablet":30,"mobile":20} --> | |
| <div class="vk_spacer"><div class="vk_spacer-display-pc" style="height:40px"></div><div class="vk_spacer-display-tablet" style="height:30px"></div><div class="vk_spacer-display-mobile" style="height:20px"></div></div> | |
| <!-- /wp:vk-blocks/spacer --> | |
| <!-- wp:vk-blocks/outer {"bgColor":"#000000","bgImage":"https://www.vektor-inc.co.jp/wp-content/uploads/2015/08/entrepreneur-1340649_640.jpg","padding_left_and_right":"1","padding_top_and_bottom":"0","opacity":0.9,"borderRadius":4} --> | |
| <div class="vk_outer vk_outer-width-normal vk_outer-paddingLR-use vk_outer-paddingVertical-none vk_outer-bgPosition-normal" style="background:linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)), url(https://www.vektor-inc.co.jp/wp-content/uploads/2015/08/entrepreneur-1340649_640.jpg);border:0px none #000;border-radius:4px"><div class="vk_outer_container"><!-- wp:vk-blocks/spacer {"pc":30,"tablet":25,"mobile":20} --> | |
| <div class="vk_spacer"><div class="vk_spacer-display |
| <?php | |
| echo __FILE__; | |
| ?> |
| ////////////////////////////////////////////// | |
| // 金額の上限〜加減のセパレーターを書き換える | |
| ////////////////////////////////////////////// | |
| function my_vgjpm_salary_separater() { | |
| return 'から'; | |
| } | |
| add_filter( 'vgjpm_salary_separater', 'my_vgjpm_salary_separater' ); | |
| ////////////////////////////////////////////// | |
| // 表のHTMLマークアップを改変する |
| function my_add_new_before_post_title( $title ) { | |
| // 今日の日付 | |
| $today = date_i18n( 'U' ); | |
| // 投稿の日付 | |
| $entry_date = get_the_time( 'U' ); | |
| // 経過日数 | |
| $past_day = date( 'U', ( $today - $entry_date ) ) / 86400; | |
| // Newを表示する日数 | |
| $display_day = 7; |
| <?php | |
| add_filter( 'lightning_next_prev_options', 'my_lightning_next_prev_options_custom' ); | |
| function my_lightning_next_prev_options_custom( $options ) { | |
| $options['display_image'] = false; | |
| return $options; | |
| } |
| <?php | |
| add_filter( 'veu_widget_taxlist_args', 'my_veu_widget_taxlist_args' ); | |
| function my_veu_widget_taxlist_args( $tax_args ) { | |
| $tax_args['show_count'] = true; | |
| return $tax_args; | |
| } |
| function my_change_query( $query ) { | |
| // 管理画面では何もしない | |
| if ( is_admin() || ! $query->is_main_query() ) { | |
| return; | |
| } | |
| // カテゴリーページでランダムにする | |
| if ( $query->is_category() ) { | |
| $query->set( 'orderby', 'rand' ); | |
| return; |
| #!/bin/sh | |
| # sh -c "$(curl -fsSL https://gist.github.com/kurudrive/d62707fc3071e7daa266e98efde29b29/raw)" | |
| # Command Line Tools for Xcode | |
| xcode-select --install | |
| # HomeBrew | |
| # see https://brew.sh/index_ja.html | |
| if [ ! -x "`which brew`" ]; then |
// kiso-seminor.php
// ■ 案A 今のまま get_posts + foreach で回すなら
the_title( $post->ID );
のように、投稿ID を渡してください。わたしていないので全部表示中のページの情報になってます。 ACFの関数は
| /** | |
| * 特殊なコードを挿入 | |
| */ | |
| function my_insert_tags() { | |
| ?> | |
| <!-- ここから下にコードを挿入 --> | |
| <!-- ここより上にコードを挿入 --> | |
| <?php | |
| } |