• Hi guys,
    I’m developing a website and in the homepage I should have an article from one category (with picture and some text) and belove a list of 3 articles from the same category (just date and titles).
    How can I do?

    Thanks everybody!

Viewing 2 replies - 1 through 2 (of 2 total)
  • link to your site?

    where exact is your problem with that?
    getting the first post to show different?
    getting posts of a category?
    getting four posts?
    the_loop?

    https://codex.www.ads-software.com/Function_Reference/query_posts

    general idea:

    <?php query_posts('category_name=onecat&posts_per_page=4');
    if(have_posts()) : $count = 1;
    while(have_posts()) : the_post();
    if( !is_paged() && $count == 1 ) { ?>
    show your post with image and text
    <?php } else { ?>
    show the date and title
    <?php }
    $count++; endwhile; endif;
    wp_reset_query(); ?>
    Thread Starter Alessandro Di Ruscio

    (@thirdeyeblind82)

    Thank you alchymyth! I’m not an expert of php but I created a loop, similar to yours and I solved it!
    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘List of articles’ is closed to new replies.