-
Author
-
November 7, 2014 at 16:48 #34560anitatakacsParticipant
Hi Kleo,
I have a problem (like Houston). My portfolio is based on race tracks (from 1. to 5. in this order). I had to create first the 5th one in order to put that in the last place, then the first is my newer portfolio item. Everything is ok, the theme displays it in the right way, but when I open the first item and I would like to step to the 2th one, the next button in on the left side, and it is not normal. We can see the same in your demo portfolio. How can we invert the order?November 7, 2014 at 17:06 #34563sharmstrModeratorApollo 13. Not Houston. 🙂
I’m not totally familiar with how this all works and it might take the kleo team some time to get to this. So, bear with me and let me ask you this. Since you did them backwards in order to produce the order you want, when you click on next, does it go up one or does it go down one. Or is it random?
The function uses get_adjacent_post(). If I’m understanding it correctly it shouldn’t be random. If thats the case and its just going the wrong way in the order, we can probably change it to previous goes to next and next goes to previous. Does that make sense?
@abe. Would it help if you made portfolio types hierarchical?Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
November 8, 2014 at 19:16 #34725anitatakacsParticipantHi Sharmstr,
I try to explain better my problem.
When I click on next, it goes up one, not random.
In your Portfolio Full Width (http://seventhqueen.com/themes/kleo/portfolio-full-width/)
your first porfolio item is Portfolio With Grid Images V2, your second one is Portfolio With Sidebar. When you open Portfolio With Grid Images V2 the arrow/tab/link to your second item is on the left side of the page. I would like to step to the next from left to right (and to the previous from right to left) because this is the order we consider as normal, and it is the order the items are showed in. In my case is very important because the tracks are in numerical order.Thanks in advance
November 8, 2014 at 21:36 #34739sharmstrModeratorI think I understand. Try this in your functions.php file. Let me know if that’s what you needed.
COPY CODEfunction kleo_post_nav( $same_cat = false ) { // Don't print empty markup if there's nowhere to navigate. $next = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( $same_cat, '', false ); $previous = get_adjacent_post( $same_cat, '', true ); if ( ! $next && ! $previous ) { return; } ?> <nav class="pagination-sticky member-navigation" role="navigation"> <?php if ( is_attachment() ) : previous_post_link( '%link', __( '<span id="older-nav">Go to article</span>', 'kleo_framework' ) ); else : if ($next) { next_post_link( '%link', '<span id="older-nav"><span class="outter-title"><span class="entry-title">' . $next->post_title . '</span></span></span>', $same_cat ); } if ($previous) { previous_post_link( '%link', '<span id="newer-nav"><span class="outter-title"><span class="entry-title">' . $previous->post_title . '</span>', $same_cat ); } endif; ?> </nav><!-- .navigation --> <?php }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
November 8, 2014 at 22:30 #34744anitatakacsParticipantGreat!!!
It works well now.
Thank you!!!
AnitaNovember 8, 2014 at 23:05 #34747sharmstrModeratorAwesome. You’re welcome.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The topic ‘Portfolio pagination order’ is closed to new replies.