追記です
incフォルダの中にある
custom-functions.phpというファイルの中に
以下の記述を見つけました。
function latestpostsoutput_func( $atts ){
extract( shortcode_atts( array(
'show' => '',
), $atts ) );
$postoutput = '';
wp_reset_query();
$n = 0;
query_posts( array( 'posts_per_page'=>$show, 'post__not_in' => get_option('sticky_posts') ) );
if ( have_posts() ) :
while ( have_posts() ) : the_post();
$n++;
if( $n%3==0 ) $nomgn = 'last'; else $nomgn = ' ';
if ( has_post_thumbnail()) {
$large_imgSrc = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
$imgUrl = $large_imgSrc[0];
}else{
$imgUrl = get_template_directory_uri().'/images/img_404.png';
}
$postoutput .= '<div class="news-box '.$nomgn.'">
<div class="news-thumb">
<a href="'.get_the_permalink().'"><img src="'.$imgUrl.'" alt="" /></a>
</div>
<div class="news">
<a href="'.get_permalink().'"><h6>'.get_the_title().'</h6></a>
<div class="date-news">
<span><i class="fa fa-calendar"></i> Posted On <a href="'.get_day_link().'">'.get_the_time('d-M-Y').'</a></span>
</div>
'.content(50).'
<a href="'.get_permalink().'" class="linkreadmore">Read More</a>
</div>
</div>';
$postoutput .= ''.(($n%3==0) ? '<div class="clear"></div>' : '');
endwhile;
endif;
wp_reset_query();
return $postoutput;
}
add_shortcode( 'latestposts', 'latestpostsoutput_func' );
同じようにincフォルダを子テーマ内に作り
custom-functions.phpをコピペして複製して
変更してみましたが変わりません。
プラグインShow Current Templateで見てみても、
子テーマ内のcustom-functions.phpは読み込んでないようです。
親テーマのcustom-functions.phpは読み込まれてました。
同じファイル名だと子テーマの方が優先されるかと思ったのですが
やり方が違うのでしょうか?
どうぞよろしくお願いします。
こんにちは
SKT Girlie Proは、有償テーマなので、このフォーラムでは扱わないことになっています。
ただ、lite版は、ディレクトリにホストされているので、light版に置き換えて考えてみました。 プロ版に適用できるかわかりません。
functions.phpに、skt_girlie_content()という関数があります。
index.phpで、この関数が使われていて、
<?php echo skt_girlie_content(27); ?>
という風に、ダイレクトに27文字が指定されています。
この関数は、プラグアブルに書かれてないので、
検証はしてませんが、
この関数を、チャイルドテーマfunctions.phpにコピー リネームして、
index.phpの関数部分を、リネームした関数に置き換えてやるといった事になると思います。
(チャイルドテーマユーザーには、大変厄介な事ですが、、、)
といった事になると思います。
同じようにincフォルダを子テーマ内に作り
custom-functions.phpをコピペして複製して
変更してみましたが変わりません。
残念ながら、このテーマでは(デフォルトもそうですが)functions.phpでインクルードするファイルは、チャイルドテーマでは動かないと思います。(proの作りは解かりませんが、)
理由は、
/**
* Implement the Custom Header feature.
*/
require get_template_directory() . '/inc/custom-header.php';
単に、テンプレートディレクトリのファイルをインクルードするだけで、チャイルドテーマでの同名ファイルの検索を行う手順が抜けているためです。(というか、そこまで考えていないんだと思います)
有料のテーマなのにお答えいただきありがとうございました。
またお返事が遅くなり、大変失礼しました。
functionが絡むファイルは難しいんですね。。
結局moreタグで対処することとしました。
細かい部分まで設定したかったらやはり一から作らないとですね。
ありがとうございました!!