• Resolved hugodebe

    (@hugodebe)


    Hi Kadence, I’m trying to edit the theme template to add page navigation buttons on the top of the Blog page.

    I have successfully copied the archive.php and search.php files in my child theme directory and duplicated the following function respectively from line 76 to line 39 and from line 37 to line 29.

    
    if ($wp_query->max_num_pages > 1) :
    if(function_exists('pinnacle_wp_pagination')) {
    ? pinnacle_wp_pagination();??
    } else { ?>?????
    ? <nav class="post-nav">
    <ul class="pager">
    ? <li class="previous"><?php next_posts_link(__('&larr; Older posts', 'pinnacle')); ?></li>
    ? <li class="next"><?php previous_posts_link(__('Newer posts &rarr;', 'pinnacle')); ?></li>
    </ul>
    ? </nav>
    <?php }
    endif;
    

    To add the Page Navigation buttons on the top of the Blog page (latest posts page), which template should I edit?
    My homepage is a static page. I’m using the grid view for the Archives and Search pages but the post list template for the Blog page. I have tried to edit template-blog.php without success.

    Thanks in advance
    Hugo

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey, if you are using the blog grid layout then your template would be template-blog-grid.php

    If you can post a link to your page I would be able to tell you exactly.

    Ben

    Thread Starter hugodebe

    (@hugodebe)

    Hi Ben, I sent you an email with the link.

    Thanks
    Hugo

    Thread Starter hugodebe

    (@hugodebe)

    Problem solved! Here is what Ben replied to me:

    “ok, so not the grid then. A list and it’s set as the “posts page” in your settings reading. Which means it uses the “home.php” template.”

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Page Navigation buttons on top of Blog page’ is closed to new replies.