• Resolved biehler423

    (@biehler423)


    I downloaded the Lavish theme for our blog and don’t understand why when I click on the page links on the bottom of the screen, it doesn’t do anything. Why won’t it go to previous content? How can I fix this? Also, is there a way to add more blog posts to the main page? I’m so confused.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Would you please provide the link of your site, so that i can solve your issue easier.
    Thanks

    Thread Starter biehler423

    (@biehler423)

    https://dreamdiapersblog.com/

    Thank you! ( And yes we will be changing the banner photo we just haven’t done that yet.)

    I have selected this media news theme for my blog and I am using its blog grid view for my infotainment blog.
    https://pixfill.com/wp-themes/medianews/blog-grid-view/
    Grid view shows 9 posts per pages with feature text and pagination, but I want to increase post more than 9 help me please.

    @biehler You have to change some line of code. If you able to edit code, change the below code and it will work for you.
    Go to index.php line number 27, 28,29, 30, 31 and 36, and remove this line code and add the below code on place of that.
    if(have_posts () ) : while( have_posts () ) : the_post();

    And again go to Setting > Reading > Blog pages show at most and set the number of post to display.

    If any confusion arise or not work, feel free to ask.

    Thank you.
    Note: Child theme is recommended to customize theme. https://codex.www.ads-software.com/Child_Themes

    While removing code do it carefully. ??

    Thank You

    @sakberaly try by the number of post from Setting > Reading. If not work, ask me again.
    Thanks

    Thanks for your reply bro but I have set blog grid view page as home page and the code that you mention to edit doesn’t appear there.

    @sakberaly Are you using premium theme or free theme?
    In case of premium theme you have to consult with theme author for your issue.

    If you have more query to ask, feel free.
    Thanks ??

    Thread Starter biehler423

    (@biehler423)

    We are using the free theme.

    Thread Starter biehler423

    (@biehler423)

    Okay, so I found the index.php but I have no idea how to find those lines. Do I just count them? Do I count blank ones? This is what it looks like:
    <?php
    /**
    * The main template file.
    *
    * This is the most generic template file in a WordPress theme
    * and one of the two required files for a theme (the other being style.css).
    * It is used to display a page when nothing more specific matches a query.
    * E.g., it puts together the home page when no home.php file exists.
    * Learn more: https://codex.www.ads-software.com/Template_Hierarchy
    *
    * @package lavish
    * @since 1.0.0
    */

    get_header(); ?>

    <?php get_sidebar( ‘top’ ); ?>
    <section id=”la-content-area” class=”la-contents” role=”main”>
    <?php $blogstyle = esc_attr(get_theme_mod( ‘blog_style’, ‘blogright’ ));
    switch ($blogstyle) {
    // Right Column
    case “blogright” :
    echo ‘<div class=”container”><div class=”row”><div class=”col-md-8 la-blog-content” role=”main”>’;

    // get all the posts
    $count = 0;
    $query1 = new WP_Query( ‘posts_per_page=3’ );
    if ( $query1->have_posts() ) : while ( $query1->have_posts() ) : $query1->the_post();
    // get the article layout
    $count++;
    get_template_part( ‘content’, get_post_format() );

    lavish_check_blog_style_clearing($count);
    endwhile;
    wp_reset_query();
    // get the pagination
    lavish_paging_nav();
    else :
    // if no posts
    get_template_part( ‘content’, ‘none’ );
    endif;
    echo ‘</div><div class=”col-md-4 right_sidebar”><aside id=”la-right” role=”complementary”>’;
    get_sidebar( ‘right’ );
    echo ‘</aside></div></div></div>’;
    break;

    // Left Column
    case “blogleft” :
    echo ‘<div class=”container”><div class=”row”><div class=”col-md-4 left_sidebar”><aside id=”la-left” role=”complementary”>’;
    get_sidebar( ‘left’ );
    echo ‘</aside></div>’;
    echo ‘<div class=”col-md-8 la-blog-content” role=”main”>’;
    $count = 0;
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    $count++;
    get_template_part( ‘content’, get_post_format() );
    lavish_check_blog_style_clearing($count);
    endwhile;
    lavish_paging_nav();
    else :
    get_template_part( ‘content’, ‘none’ );
    endif;
    echo ‘</div></div></div>’;
    break;

    // Left and Right Column
    case “blogleftright” :
    echo ‘<div class=”container”><div class=”row”><div class=”col-md-3 left_sidebar”><aside id=”la-left” role=”complementary”>’;
    get_sidebar( ‘left’ );
    echo ‘</aside></div>’;
    echo ‘<div class=”col-md-6 la-blog-content” role=”main”>’;
    $count = 0;
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    $count++;
    get_template_part( ‘content’, get_post_format() );
    lavish_check_blog_style_clearing($count);
    endwhile;
    lavish_paging_nav();
    else :
    get_template_part( ‘content’, ‘none’ );
    endif;
    echo ‘</div><div class=”col-md-3 right_sidebar”><aside id=”la-right” role=”complementary”>’;
    get_sidebar( ‘right’ );
    echo ‘</aside></div></div></div>’;
    break;

    // Wide Column
    case “blogwide” :

    echo ‘<div class=”container”><div class=”row la-content” role=”main”><div class=”col-md-12″>’;
    $count = 0;
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    $count++;
    get_template_part( ‘content’, get_post_format() );
    lavish_check_blog_style_clearing($count);
    endwhile;
    lavish_paging_nav();
    else :
    get_template_part( ‘content’, ‘none’ );
    endif;

    echo ‘</div></div></div>’;
    break;
    //Manosary Blog Contents
    case “manosaryright” :
    echo ‘<div class=”container”><div class=”row”><div class=”col-md-3 left_sidebar”><aside id=”la-left” role=”complementary”>’;
    get_sidebar( ‘left’ );
    echo ‘</aside></div>’;
    echo ‘<div class=”col-md-6 la-blog-content” role=”main”>’;
    $count = 0;
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    $count++;
    get_template_part( ‘content’, get_post_format() );
    lavish_check_blog_style_clearing($count);
    endwhile;
    lavish_paging_nav();
    else :
    get_template_part( ‘content’, ‘none’ );
    endif;
    echo ‘</div><div class=”col-md-3 right_sidebar”><aside id=”la-right” role=”complementary”>’;
    get_sidebar( ‘right’ );
    echo ‘</aside></div></div></div>’;
    break;

    // Left Column
    case “manosaryleft” :
    echo ‘<div class=”container”><div class=”row”><div class=”col-md-3 left_sidebar”><aside id=”la-left” role=”complementary”>’;
    get_sidebar( ‘left’ );
    echo ‘</aside></div>’;
    echo ‘<div class=”col-md-6 la-blog-content” role=”main”>’;
    $count = 0;
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    $count++;
    get_template_part( ‘content’, get_post_format() );
    lavish_check_blog_style_clearing($count);
    endwhile;
    lavish_paging_nav();
    else :
    get_template_part( ‘content’, ‘none’ );
    endif;
    echo ‘</div><div class=”col-md-3 right_sidebar”><aside id=”la-right” role=”complementary”>’;
    get_sidebar( ‘right’ );
    echo ‘</aside></div></div></div>’;
    break;

    // Wide Column
    case “manosarywide” :

    echo ‘<div class=”container”><div class=”row”><div class=”col-md-3 left_sidebar”><aside id=”la-left” role=”complementary”>’;
    get_sidebar( ‘left’ );
    echo ‘</aside></div>’;
    echo ‘<div class=”col-md-6 la-blog-content” role=”main”>’;
    $count = 0;
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    $count++;
    get_template_part( ‘content’, get_post_format() );
    lavish_check_blog_style_clearing($count);
    endwhile;
    lavish_paging_nav();
    else :
    get_template_part( ‘content’, ‘none’ );
    endif;
    echo ‘</div><div class=”col-md-3 right_sidebar”><aside id=”la-right” role=”complementary”>’;
    get_sidebar( ‘right’ );
    echo ‘</aside></div></div></div>’;
    break;

    //Boxed Blog Contents
    case “boxedright” :
    echo ‘<div class=”container”><div class=”row”><div class=”col-md-3 left_sidebar”><aside id=”la-left” role=”complementary”>’;
    get_sidebar( ‘left’ );
    echo ‘</aside></div>’;
    echo ‘<div class=”col-md-6 la-blog-content” role=”main”>’;
    $count = 0;
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    $count++;
    get_template_part( ‘content’, get_post_format() );
    lavish_check_blog_style_clearing($count);
    endwhile;
    lavish_paging_nav();
    else :
    get_template_part( ‘content’, ‘none’ );
    endif;
    echo ‘</div><div class=”col-md-3 right_sidebar”><aside id=”la-right” role=”complementary”>’;
    get_sidebar( ‘right’ );
    echo ‘</aside></div></div></div>’;
    break;

    // Left Column
    case “boxedleft” :
    echo ‘<div class=”container”><div class=”row”><div class=”col-md-3 left_sidebar”><aside id=”la-left” role=”complementary”>’;
    get_sidebar( ‘left’ );
    echo ‘</aside></div>’;
    echo ‘<div class=”col-md-6 la-blog-content” role=”main”>’;
    $count = 0;
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    $count++;
    get_template_part( ‘content’, get_post_format() );
    lavish_check_blog_style_clearing($count);
    endwhile;
    lavish_paging_nav();
    else :
    get_template_part( ‘content’, ‘none’ );
    endif;
    echo ‘</div><div class=”col-md-3 right_sidebar”><aside id=”la-right” role=”complementary”>’;
    get_sidebar( ‘right’ );
    echo ‘</aside></div></div></div>’;
    break;

    // Wide Column
    case “boxedwide” :
    echo ‘<div class=”container”><div class=”row”><div class=”col-md-3 left_sidebar”><aside id=”la-left” role=”complementary”>’;
    get_sidebar( ‘left’ );
    echo ‘</aside></div>’;
    echo ‘<div class=”col-md-6 la-blog-content” role=”main”>’;
    $count = 0;
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    $count++;
    get_template_part( ‘content’, get_post_format() );
    lavish_check_blog_style_clearing($count);
    endwhile;
    lavish_paging_nav();
    else :
    get_template_part( ‘content’, ‘none’ );
    endif;
    echo ‘</div><div class=”col-md-3 right_sidebar”><aside id=”la-right” role=”complementary”>’;
    get_sidebar( ‘right’ );
    echo ‘</aside></div></div></div>’;
    break;

    }
    ?>

    </section>
    <?php get_footer(); ?>

    Find the screenshot from below link and i think you will found the solution more easier.

    https://prntscr.com/8yf9vc

    Thanks

    Thread Starter biehler423

    (@biehler423)

    Bless you!!! It worked! Thank you so much!

    I want my post split in many parts in single post with number navigation

    Thread Starter biehler423

    (@biehler423)

    Okay, so there’s a new problem. I can’t highlight on the post to copy and paste text- it turns all text into a link to a page that cannot be found.. It’s weird. Any thoughts on how to fix this?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Pagination for Blog’ is closed to new replies.