-
Author
-
February 15, 2016 at 19:17 #103993saveorcancelParticipant
Hello! I have a problem with the pagination on the website http://www.feeder.ro
The pagination is only displayed on the homepage. Any other page, for example http://www.feeder.ro/insider has a Kleo Posts element with the Post count: All but there is no pagination on the page.
How can I add it in order to be similar to the homepage?
Attachments:
You must be logged in to view attached files.February 15, 2016 at 19:53 #104006RaduModeratorHello,
Kleo Posts element from visual composer does not have pagination option but you can use Post Grid element that offers you pagination but the layouts will not be identically
Cheers
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 16, 2016 at 10:50 #104094saveorcancelParticipantThank you, Radu!
I already konw about that option (Post Grid) but the design of the grid is different from the one on the homepage.
I would like to have the same structure, with the same design and pagination. Is that impossible? The only way to make them look alike is by adding custom css?
Thank you!
February 18, 2016 at 12:05 #104674saveorcancelParticipantHello again, Radu!
I copied the pagination from index (the post navigation) and pasted it on posts grid but I have an error that refers to ”endif” on the line 120. I will attach a screenshot of the code.
Do you know how can I fix that error? Do you think the pagination will work this way?
Thank you again!
Attachments:
You must be logged in to view attached files.February 18, 2016 at 12:56 #104683AndreiModeratorCan you share the error you’re get ? Don’t know if it will work 100%, especially if you use multiple post grids per page so this is fully experimental.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 18, 2016 at 14:53 #104712saveorcancelParticipantThank you for your answer, Andrei.
The screenshot is the error, as it was on the site.
I wouldn’t go through all this hassle but the thing is – I can’t get the demo page (home pinterest – http://feeder.ro/home-pinterest) to load “All” our posts, it just times out. If pagination was available in this page element, we could display a certain number of posts per page.I’ve attached the modified post grid – #2 – error on line 120
I’ve also attached a new try at the vc posts grid – #4 – error – line 118 endifWe won’t use multiple grids on one page, we are setting up custom pages for the site’s categories, and we wanted the pinterest home style. The other vc available grids look totally different.
Thank you,
Cristiana.Attachments:
You must be logged in to view attached files.February 18, 2016 at 15:12 #104716saveorcancelParticipantI couldn’t upload the php
Here is try #2 posts grid – error on line 120
COPY CODE<?php global $kleo_config; $grid_link = $grid_layout_mode = $title = $filter = $show_thumb = $inline_meta = $show_footer = ''; $posts = array(); extract(shortcode_atts(array( 'title' => '', 'columns' => 4, 'el_class' => '', 'orderby' => NULL, 'order' => 'DESC', 'loop' => '', 'post_layout' => 'grid', 'show_thumb' => 'yes', 'show_meta' => 'yes', 'inline_meta' => 'no', 'show_excerpt' => 'yes', 'show_switcher' => 'no', 'show_footer' => 'yes', 'switcher_layouts' => array_values(array_flip($kleo_config['blog_layouts'])) ), $atts)); if( empty( $loop ) ) return; $this->getLoop( $loop ); $my_query = $this->query; $args = $this->loop_args; $el_class = $el_class != "" ? " ".$el_class : ""; // Alias for Grid to Masonry if ( $post_layout == 'grid' ) { $post_layout = 'masonry'; } $post_layout = apply_filters( 'kleo_blog_type', $post_layout, get_the_ID() ); if ( $post_layout == 'standard' && 0 === strpos( $show_thumb, 'just_' ) ) { global $conditional_thumb; $conditional_thumb = substr( $show_thumb, -1 ); $el_class .= ' just-thumb-' . $conditional_thumb; } elseif ( $show_thumb == 'no' ) { global $conditional_thumb; $conditional_thumb = 0; } if ( $show_meta == 'yes' ) { $el_class .= ' with-meta'; } else { $el_class .= ' no-meta'; } if ( $show_footer == 'no' ) { $el_class .= ' no-footer'; } if ( $show_excerpt == 'no' ) { $el_class .= ' no-excerpt'; } if ( $inline_meta == 'yes' ) { $el_class .= ' inline-meta'; } $el_class .= " " . $post_layout . '-listing'; query_posts($args); if ( have_posts() ) : ?> <?php if ( $show_switcher == 'yes' ) : ?> <?php $switcher_layouts = explode( ',',$switcher_layouts ); kleo_view_switch( $switcher_layouts, $post_layout, get_the_ID() ); ?> <?php endif; ?> <?php if ( $post_layout == 'masonry' ) : ?> <div class="posts-listing responsive-cols kleo-masonry per-row-<?php echo $columns;?><?php echo $el_class;?>"> <?php else: ?> <div class="posts-listing <?php echo $el_class;?>"> <?php endif; ?> <?php while ( have_posts() ) : the_post(); if ( $post_layout != 'standard' ) { get_template_part( 'page-parts/post-content-' . $post_layout ); } else { get_template_part( 'content', get_post_format() ); } endwhile; if ($post_layout == 'masonry') : ?> <?php endif; ?> <?php // Post navigation. kleo_pagination(); else : // If no content, include the "No posts found" template. get_template_part( 'content', 'none' ); endif; ?> </div> <!-- END post listing --> <?php endif; // Reset Query wp_reset_query();
try #4 @ vc posts grid – error – line 118
COPY CODE<?php global $kleo_config; $grid_link = $grid_layout_mode = $title = $filter = $show_thumb = $inline_meta = $show_footer = ''; $posts = array(); extract(shortcode_atts(array( 'title' => '', 'columns' => 4, 'el_class' => '', 'orderby' => NULL, 'order' => 'DESC', 'loop' => '', 'post_layout' => 'grid', 'show_thumb' => 'yes', 'show_meta' => 'yes', 'inline_meta' => 'no', 'show_excerpt' => 'yes', 'show_switcher' => 'no', 'show_footer' => 'yes', 'switcher_layouts' => array_values(array_flip($kleo_config['blog_layouts'])) ), $atts)); if( empty( $loop ) ) return; $this->getLoop( $loop ); $my_query = $this->query; $args = $this->loop_args; $el_class = $el_class != "" ? " ".$el_class : ""; // Alias for Grid to Masonry if ( $post_layout == 'grid' ) { $post_layout = 'masonry'; } $post_layout = apply_filters( 'kleo_blog_type', $post_layout, get_the_ID() ); if ( $post_layout == 'standard' && 0 === strpos( $show_thumb, 'just_' ) ) { global $conditional_thumb; $conditional_thumb = substr( $show_thumb, -1 ); $el_class .= ' just-thumb-' . $conditional_thumb; } elseif ( $show_thumb == 'no' ) { global $conditional_thumb; $conditional_thumb = 0; } if ( $show_meta == 'yes' ) { $el_class .= ' with-meta'; } else { $el_class .= ' no-meta'; } if ( $show_footer == 'no' ) { $el_class .= ' no-footer'; } if ( $show_excerpt == 'no' ) { $el_class .= ' no-excerpt'; } if ( $inline_meta == 'yes' ) { $el_class .= ' inline-meta'; } $el_class .= " " . $post_layout . '-listing'; query_posts($args); if ( have_posts() ) : ?> <?php if ( $show_switcher == 'yes' ) : ?> <?php if(!is_array($switcher_layouts)){ $switcher_layouts = explode( ',',$switcher_layouts ); } kleo_view_switch( $switcher_layouts, $post_layout, get_the_ID() ); ?> <?php endif; ?> <?php if ( $post_layout == 'masonry' ) : ?> <div class="posts-listing responsive-cols kleo-masonry per-row-<?php echo $columns;?><?php echo $el_class;?>"> <?php else: ?> <div class="posts-listing <?php echo $el_class;?>"> <?php endif; ?> <?php while ( have_posts() ) : the_post(); if ( $post_layout != 'standard' ) { get_template_part( 'page-parts/post-content-' . $post_layout ); } else { get_template_part( 'content', get_post_format() ); } endwhile; ?> </div> <!-- END post listing --> <?php // Post navigation. kleo_pagination(); else : // If no content, include the "No posts found" template. get_template_part( 'content', 'none' ); endif; ?> <?php endif; // Reset Query wp_reset_query();
February 21, 2016 at 23:09 #105547AndreiModeratorA much better approach for this would be of using directly the category pages and set your blog to list posts in pinterest style. Extra tip, you can use a plugin like “No category base” for nicer blog category urls.
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.