Tagged: x
-
AuthorPosts
-
April 26, 2016 at 6:04 am #900089
hjafferParticipantHi
I created a custom grid skin with Essential Grid but I noticed that it doesn’t show all items. In one of the items, I have 49 posts, but it shows only 10, which is the number I chose under grid settings > smart loading > item no. at start. I’ve chosen to disable pagination and enable load more. I’ve also -1 at the maximum entries option under source.
Any idea what I’m missing?
Thanks
April 26, 2016 at 11:17 pm #901418
Nabeel AModeratorHi there,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
April 27, 2016 at 2:03 am #901539
hjafferParticipantThis reply has been marked as private.April 27, 2016 at 11:08 am #902471
JackKeymasterHi there @hjaffer,
Thanks for writing back.
I’ve checked your site and can’t see any Grid with more than 10 items selected in the Essential Grid settings for that particular grid. Did you delete the Grid in question?
Thank you!
April 27, 2016 at 12:41 pm #902671
hjafferParticipantThis reply has been marked as private.April 28, 2016 at 12:32 am #903554
RadModeratorHi there,
This http://www.gonefreeapps.com/gone-free/ is a category page, where the posts per page is controlled by global setting.
Currently, it’s set to 10 here http://www.gonefreeapps.com/wp-admin/options-reading.php
Please try changing it.
Thanks!
April 28, 2016 at 12:49 am #903560
hjafferParticipantThanks Rad. They show 10 and there’s the pagination. Now, with essential grid, they show 10 and that’s it. There’s no pagination and you can’t view more posts. That shouldn’t be the case Rad.
April 28, 2016 at 2:41 pm #904608
RadModeratorHi there,
This essential grid hijacks the default functionality of an archive page. I think you followed this
https://www.themepunch.com/faq/auto-populate-grid-for-blog-pages-with-the-loop-advanced/
https://www.themepunch.com/faq/auto-populate-woocommerce-category-page-with-essential-grid/This only means, query_var and pagination aren’t included which is usually default to an archive page. In short, you need more customization and tell the grid the current offset and posts per page manually for it to work. Though, I’m not able to provide customization of this level.
Thanks for understanding.
April 28, 2016 at 4:26 pm #904764
hjafferParticipantThanks Rad. Something similar I followed. Here’s a link to what I followed
Is that what causes this. I’ve read that a number of users have been facing issues with EG recently (in the Facebook Group).
Thanks
April 29, 2016 at 7:36 am #905593
ZeshanMemberHi there @hjaffer,
Thanks for updating the thread!
Regretfully, as mentioned above, because you are trying to add the Essential Grid on an archive page, it’s causing conflict with the archive page query. It could be possible to achieve with custom development, but would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this.
Thanks for understanding. Take care!
April 29, 2016 at 12:33 pm #905935
hjafferParticipantThanks, but guys I’m trying to make this simple. It’s an Essential Grid thing, not archive page. I’ll try my best to explain this.
I’ve overwritten the archive page with the code I added to show Essential grid style for my archive pages. Standard archive pages are overwritten now, so forget it.
The issue: the Essential Grid I created, to overwrite the archive pages, doesn’t show all items although I have enabled load more button in my grid.
Put very simple, the load more button doesn’t show up although I’ve enabled it. If you’re wondering, this is the “Global Grid” under Essential Grid.
Examples? Look at the page I posted above.
Thanks
April 30, 2016 at 4:47 am #906760
RadModeratorHi there,
But you did add you’re the Essential grid in an archive page. Which still makes it an archive page, and archive page has its own global query while Essential grid uses local query. Even if you don’t want to make it an archive page, it is still an archive page because it’s added there. You did change the layout, but not the global queries and variables ( I’m not referring to global grid, but the things that make an archive page, a WordPress standard ).
They will, of course, have same issues, since it’s implemented in a similar way. Like what I’m referring, it should at least copy the query_var, offset, and paged/page variables of the global query of an archive page. It’s not just putting an Essential Grid in a template.
And all this is part of the custom development that aren’t cover by our capability as support. It’s not a bug, but an implementation of a custom feature.
How about posting the code here so we can analyze it, but I can’t guarantee a solution.
According here : https://www.themepunch.com/faq/auto-populate-grid-for-blog-pages-with-the-loop-advanced/
Remember to coordinate the WordPress “Post per Page” setting with the pagination setting of Essential Grid.
If you want to use the Essential Grid included pagination only please set the “Post per Page” in the Reading Settings to an abnormal huge number like 99999. This will make the theme’s default pagination disappear.
If you want to change the number of posts per page depending on the post type or other conditionals you can use the “pre_get_posts” filter:
https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_postsThat confirm that if you wish to fully replace the default functionality of an archive page, you should use the global pagination, offset, query_var, and etc. using pre_get_posts.
Thanks!
May 1, 2016 at 7:13 am #907781
hjafferParticipantThanks Rad. Appreciate your patience. Here’s the code
<?php // ============================================================================= // VIEWS/GLOBAL/_INDEX.PHP // ----------------------------------------------------------------------------- // Includes the index output. // ============================================================================= $stack = x_get_stack(); if ( is_home() ) : $style = x_get_option( 'x_blog_style' ); $condition = is_home(); elseif ( is_archive() ) : $style = x_get_option( 'x_archive_style' ); $condition = is_archive(); elseif ( is_search() ) : $condition = false; endif; ?> <?php if ( $condition ) : ?> <?php if ( have_posts() ) : ?> <?php $my_post_array = array(); ?> <?php while ( have_posts() ) : the_post(); ?> <?php $my_post_array[] = $post->ID; ?> <?php endwhile; ?> <?php echo do_shortcode('[ess_grid alias="global-grid" posts="'.implode(',', $my_post_array).'"]'); ?> <?php else : ?> <?php x_get_view( 'global', '_content-none' ); ?> <?php endif; ?> <?php else : ?> <?php if ( have_posts() ) : ?> <?php $my_post_array = array(); ?> <?php while ( have_posts() ) : the_post(); ?> <?php $my_post_array[] = $post->ID; ?> <?php endwhile; ?> <?php echo do_shortcode('[ess_grid alias="global-grid" posts="'.implode(',', $my_post_array).'"]'); ?> <?php else : ?> <?php x_get_view( 'global', '_content-none' ); ?> <?php endif; ?> <?php endif; ?>Located at: /wp-content/themes/x-child (child theme)/framework/views/global
Hop this gives clearer idea.
Thanks again for your patience guys…
May 1, 2016 at 7:22 pm #908340
LelyModeratorHello There,
Thank you for giving us your code.
Upon checking, the code is still using the default main query.By default, in any given context, WordPress uses the main query to determine pagination. The main query object is stored in the $wp_query global, which is also used to output the main query loop:
if ( have_posts() ) : while ( have_posts() ) : the_post();-> this is the default query that handles the pagination. Your code is still using this. The code just pass the result of this main query in the object array and then you have use this array in essential grid shortcode. If you want to show all items, we have to use custom query. Unfortunately as stated above this is possible only via customization. For more clarification on the problem, please check this thread:http://wordpress.stackexchange.com/questions/120407/how-to-fix-pagination-for-custom-loopsHope this helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-900089 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
