Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • @poliquinp: working pretty fine is good. I used the_date(), i don’t forget it have problem what, since i use the_time().
    you can search the_date vs the_time to study.

    <?php
    
    // Get lastests news
    
    global $post;
    $args = array(
    'numberposts' =>2,
    'orderby' => date,
    'order' => desc,
    'cat' => 1
    );
    
    query_posts($args);
    
    while(have_posts()) { the_post();
    
    ?>
    
    <h3><img src="https://www.detailformation.com/images/fleche-date.gif" align="absmiddle" /> <?php the_time('j F Y'); ?></h3>
    
    <?= the_title(); ?>
    
    <p><?= the_excerpt(); ?></p>
    
    <p align="right" style="text-align: right">
    
    " title="<?= the_title(); ?>" class="plus">En savoir plus <img src="https://www.detailformation.com/images/gris-fleche.gif" alt="" align="absmiddle" />
    
    </p>
    
    <?php } ?>

    i think code below:
    $cat = get_query_var(‘cat’);
    query_posts(array(‘category__in’ => array($cat), ‘posts_per_page’ => -1, ‘orderby’ => ‘date’,
    ‘order’ => ‘ASC’));
    have problem parameter ‘category__in’ => array($cat) or ‘orderby’ => ‘date’

    code second:
    foreach( get_categories() as $cat_id ) {
    $args=array(
    ‘cat’ => $cat_id,
    ‘post_type’ => ‘post’,
    ‘post_status’ => ‘publish’,
    ‘posts_per_page’ => 2,
    ‘caller_get_posts’=> 1
    );
    }
    have problem parameter ‘cat’ => $cat_id ($cat_id is array)

    give me question:
    do you need any posts ?
    can i help you?
    sorry, my english is very bad, not describle good

Viewing 3 replies - 1 through 3 (of 3 total)