• Resolved simun.visevic

    (@simunvisevic)


    Hi, first of all very nice theme. I whould like in the section latest post show all posts that i have. Number of posts is 12. Is that possible?
    Regards,
    Šimun

Viewing 9 replies - 1 through 9 (of 9 total)
  • siniplyrathemes

    (@siniplyrathemes)

    Hello, @simunvisevic.

    Thank you for contacting us and I’m glad to read that you like our theme. We appreciate it. 🙂

    In order to show 12 (or more) posts in the blog feed, please go to your Dashboard then Settings -> Reading and adjust the number next to “Blog page shows at most” to 12 or any number you want.

    If you have any additional questions, feel free to ask.

    Regards,
    Siniša.

    Thread Starter simun.visevic

    (@simunvisevic)

    Thx for quick answer, but except blog I whould like to show all posts on the front page on the place where is latest post section, as I can see there max number of post is 3

    Theme Author lyrathemes

    (@lyrathemes)

    @simunvisevic – you’re right, currently we allow for a max of 3 posts to be shown there. If you want to change that, you’ll need to make changes to the file parts/frontpage-latest-posts.php

    Thread Starter simun.visevic

    (@simunvisevic)

    Yes I understand. Here is the code for row

    
     <div class="row">
                <?php 
                global $post; $i = 0;
                $args = array( 'numberposts' => $vega_wp_frontpage_latest_posts_n, 'suppress_filters'=>0  );
                $recent_posts = get_posts( $args ); 
                foreach( $recent_posts as $post ){
                setup_postdata( $post ); 
                ?>
                <div class="<?php echo $classes[$i]; $i++; ?> wow zoomIn">
                    <?php get_template_part('parts/content','recent'); ?>
                </div>
                <?php } ?>
                <?php wp_reset_postdata();?>
            </div>
    

    $vega_wp_frontpage_latest_posts_n this variable returns how many post will I get. If i change it on 12 i’ll get last 12 posts but I canot find a way if i copy this code 4 time how i can get this situation.
    1 row – latest post 1-3
    2 row – latest posts 3-6 […]

    If someone has idea i whould be very happy:)

    Hi @simunvisevic,

    All columns have float: left; declaration so they should show up in three columns layout even if you change the number of posts. I don’t think you need to create 4 rows with 3 columns. Use default structure with 1 row and 12 posts in 3 column layout.

    Hope that helps.

    Kind regards

    Thread Starter simun.visevic

    (@simunvisevic)

    I was trying to do that but I had problem with recent post loop i couldnt fix it that show
    1. row – 1-3 post
    2. row – 3-6 post …
    So i use template for blog/category content.php and “copy” it to frontpage-latest-posts.php with some changes in code. I cant do it better

    Hi there,

    Actually you should only change the code above in frontpage-latest-posts.php file to this:

    <div class="row">
                <?php 
                global $post; $i = 0;
                $args = array( 'numberposts' => 12, 'suppress_filters'=>0  );
                $recent_posts = get_posts( $args ); 
                foreach( $recent_posts as $post ){
                setup_postdata( $post ); 
                ?>
                <div class="col-sm-4 wow zoomIn">
                    <?php get_template_part('parts/content','recent'); ?>
                </div>
                <?php } ?>
                <?php wp_reset_postdata();?>
            </div>

    Hope that helps.

    Best

    Thread Starter simun.visevic

    (@simunvisevic)

    Yes its functioning. Thank you @jarektheme

    • This reply was modified 5 years, 11 months ago by simun.visevic.

    Hi @simunvisevic,

    I’m glad to hear that 🙂

    Would you please take some time out from your busy day to leave us a quick review?
    We’d really appreciate it 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Latest post/Show all posts’ is closed to new replies.