cdonzel
Forum Replies Created
-
Forum: Plugins
In reply to: [Polylang] Homepage template different than page 2, 3 (pagination)Ok, thanks Chrystl anyway for all your help.
I will dig into this pagination issue and will report back once I have fixed it.
Thanks again.
Forum: Plugins
In reply to: [Polylang] Homepage template different than page 2, 3 (pagination)Hello Chrystl.
Here you go:
https://www.nonarrativelines.com/wp-content/uploads/2016/01/Capture-d’e?cran-2016-01-13-a?-14.05.08.png
https://www.nonarrativelines.com/wp-content/uploads/2016/01/Capture-d’e?cran-2016-01-13-a?-14.05.27.png
https://www.nonarrativelines.com/wp-content/uploads/2016/01/Capture-d’e?cran-2016-01-13-a?-14.06.54.pngDoes that help?
Thanks
ClementForum: Plugins
In reply to: [Polylang] Homepage template different than page 2, 3 (pagination)template-blog-grid.php
Forum: Plugins
In reply to: [Polylang] Homepage template different than page 2, 3 (pagination)<?php /* Template Name: Blog Grid */ ?>
Forum: Plugins
In reply to: [Polylang] Homepage template different than page 2, 3 (pagination)Yes, I do have the same page template for both french and english pages. On the page area of the WP admin section, I have clicked the “+” to add a translation.
Here is my template page code
<?php /* Template Name: xxxx */ ?> <?php get_header(); ?> <div class="page-content"> <?php while ( have_posts() ) : the_post(); get_template_part( 'content-page' ); endwhile; $posts_per_page = get_option( 'posts_per_page' ); $paged = 1; if ( get_query_var( 'paged' ) ) $paged = get_query_var( 'paged' ); if ( get_query_var( 'page' ) ) $paged = get_query_var( 'page' ); $blog_query_args = array( 'post_type' => 'post', 'paged' => $paged, 'posts_per_page' => $posts_per_page ); $blog_query = new WP_Query( $blog_query_args ); if ( $blog_query->have_posts() ) : echo '<div id="blog" class="blog-area">'; while ( $blog_query->have_posts() ) : $blog_query->the_post(); get_template_part( 'content' ); endwhile; echo '</div>'; $links = paginate_links( array( 'prev_text' => '←', 'next_text' => '→', 'total' => $blog_query->max_num_pages ) ); if ( $links ) { echo '<nav class="posts-pagination" role="navigation">'; echo $links; echo '</nav>'; } wp_reset_postdata(); else : get_template_part( 'content-none' ); endif; ?> </div> <?php get_footer(); ?>
Forum: Plugins
In reply to: [Polylang] Homepage template different than page 2, 3 (pagination)Hello Chrystl. I have used the theme option.
Forum: Plugins
In reply to: [Polylang] Homepage template different than page 2, 3 (pagination)Hi Chrystl and thanks for your reply.
If I deactivate polylang, I have another scenario: When I click on link to go to page #2 from the homepage, the URL looks correct (domainname.com/page/2) but when clicked, the link bring me back to my homepage (domainname.com).
Basically, the pagination does not work as when I click on page 2 or page 3, it still bring me back to my homepage (it almost looks like I have a redirection that bring me back to my homepage permanently). Weird.
Thank you for any hint!
Clement