サポート » 使い方全般 » 投稿記事一覧が名前順から古い順に変えたいのですが・・・

  • 解決済 forexforexforex1985

    (@forexforexforex1985)


    現在下記のようになっています。
    ネット上を検索し、

    <?php if (have_posts()) : ?>
    の上に

    <?php query_posts(“&orderby=date&order=ASC”); ?>
    を載せればよいと、分かりましたが
    反映されず、名前順です。

    何が違うか分かる方、いらっしゃいますでしょうか?

    <?php if (have_posts()) : ?>

    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>

    <?php /* If this is a category archive */ if (is_category()) { ?>
    <?php query_posts(‘orderby=date&order=asc’); ?>
    <h5 class=”pagetitle”>カテゴリー“<?php echo single_cat_title(); ?>”の記事一覧 <?php echo cat_header_link(); ?></h5>

    <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    <h5 class=”pagetitle”>Archive for <?php the_time(‘F jS, Y’); echo mo_header_link(); ?></h5>

    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    <h5 class=”pagetitle”>Archive for <?php the_time(‘F, Y’); echo mo_header_link();?></h5>

    <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    <h5 class=”pagetitle”>Archive for <?php the_time(‘Y’); echo mo_header_link(); ?></h5>

    <?php /* If this is a search */ } elseif (is_search()) { ?>
    <h5 class=”pagetitle”>Search Results</h5>

    <?php /* If this is an author archive */ } elseif (is_author()) { ?>
    <h5 class=”pagetitle”>Author Archive</h5>

    <?php /* If this is a paged archive */ } elseif (isset($_GET[‘paged’]) && !empty($_GET[‘paged’])) { ?>
    <h5 class=”pagetitle”>Blog Archives</h5>

    <?php } ?>

2件の返信を表示中 - 1 - 2件目 (全2件中)
  • トピック投稿者 forexforexforex1985

    (@forexforexforex1985)

    <?php if (have_posts()) : ?>
    
    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
    
    <?php /* If this is a category archive */ if (is_category()) { ?>
    <?php query_posts('orderby=date&order=asc'); ?>
    <h5 class="pagetitle">カテゴリー“<?php echo single_cat_title(); ?>”の記事一覧 <?php echo cat_header_link(); ?></h5>
    
    <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    <h5 class="pagetitle">Archive for <?php the_time('F jS, Y'); echo mo_header_link(); ?></h5>
    
    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    <h5 class="pagetitle">Archive for <?php the_time('F, Y'); echo mo_header_link();?></h5>
    
    <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    <h5 class="pagetitle">Archive for <?php the_time('Y'); echo mo_header_link(); ?></h5>
    
    <?php /* If this is a search */ } elseif (is_search()) { ?>
    <h5 class="pagetitle">Search Results</h5>
    
    <?php /* If this is an author archive */ } elseif (is_author()) { ?>
    <h5 class="pagetitle">Author Archive</h5>
    
    <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    <h5 class="pagetitle">Blog Archives</h5>
    
    <?php } ?>

    読みにくかったのでもういちど載せます

    トピック投稿者 forexforexforex1985

    (@forexforexforex1985)

    解決しました。

    そもそも考え方が違っていました。
    DC nicer archiveというプラグインの影響で
    名前順になっていただけでした。

    そちらのプラグインの中のphpの

    orderby=title

    orderby=date
    したらできました

2件の返信を表示中 - 1 - 2件目 (全2件中)
  • トピック「投稿記事一覧が名前順から古い順に変えたいのですが・・・」には新たに返信することはできません。