ブログのメインページにサムネイル画像のみを表示し、投稿内に投稿に添付されている他のすべての画像を表示する方法を見つけようとしています。
運が悪かったのでグーグルで検索しました...誰か助けてくれますか?
ここで私が何を意味するかを見ることができます: blog.turdidesigns.com
wordpress初心者なので、的外れな質問でしたらすみません。
ありがとう、
ブログのメインページにサムネイル画像のみを表示し、投稿内に投稿に添付されている他のすべての画像を表示する方法を見つけようとしています。
運が悪かったのでグーグルで検索しました...誰か助けてくれますか?
ここで私が何を意味するかを見ることができます: blog.turdidesigns.com
wordpress初心者なので、的外れな質問でしたらすみません。
ありがとう、
私のインデックスphpにはこれがありません...
これが私が持っているものです:私のテーマフォルダinfexphpにはこれしかありません:
<?php get_header(); ?>
<div class="art-layout-wrapper">
<div class="art-content-layout">
<div class="art-content-layout-row">
<div class="art-layout-cell art-content">
<?php get_sidebar('top'); ?>
<?php
if(have_posts()) {
/* Display navigation to next/previous pages when applicable */
if ( theme_get_option('theme_' . (theme_is_home() ? 'home_' : '') . 'top_posts_navigation' ) ) {
theme_page_navigation();
}
/* Start the Loop */
while (have_posts()) {
the_post();
get_template_part('content', get_post_format());
}
/* Display navigation to next/previous pages when applicable */
if (theme_get_option('theme_bottom_posts_navigation')) {
theme_page_navigation();
}
} else {
theme_404_content();
}
?>
<?php get_sidebar('bottom'); ?>
<div class="cleared"></div>
</div>
<div class="art-layout-cell art-sidebar1">
<?php get_sidebar('default'); ?>
<div class="cleared"></div>
</div>
</div>
</div>
</div>
<div class="cleared"></div>
<?php get_footer(); ?>
このテーマはArtisteerでやったので、あまり判断しないでください;)
index.php ファイルで the_content(); を置き換えます。the_excerpt(); で
また、これはループしている可能性があるため、単一のループではなく、記事リスト (カテゴリ、アーカイブ、検索) でこれを置き換えるようにしてください。
返事が遅れて申し訳ありません !!!
content.php コードは次のとおりです。
<?php
/**
*
* content*.php
*
* The post format template. You can change the structure of your posts or add/remove post elements here.
*
* 'id' - post id
* 'class' - post class
* 'thumbnail' - post icon
* 'title' - post title
* 'before' - post header metadata
* 'content' - post content
* 'after' - post footer metadata
*
* To create a new custom post format template you must create a file "content-YourTemplateName.php"
* Then copy the contents of the existing content.php into your file and edit it the way you want.
*
* Change an existing get_template_part() function as follows:
* get_template_part('content', 'YourTemplateName');
*
*/
global $post;
theme_post_wrapper(
array(
'id' => theme_get_post_id(),
'class' => theme_get_post_class(),
'thumbnail' => theme_get_post_thumbnail(),
'title' => '<a href="' . get_permalink( $post->ID ) . '" rel="bookmark" title="' . strip_tags(get_the_title()) . '">' . get_the_title() . '</a>',
'heading' => theme_get_option('theme_'.(is_single()?'single':'posts').'_article_title_tag'),
'before' => theme_get_metadata_icons( 'date,author,edit', 'header' ),
'content' => theme_get_excerpt(),
'after' => theme_get_metadata_icons( 'category,tag,comments', 'footer' )
)
);
?>