-
AuthorPosts
-
February 27, 2018 at 12:58 pm #918414
Hi!
Following problem: i have multiple Portfolio Categories displayed as Masonry Grid on single pages as that: Link 1
When i open a single Portfolio Item (Link 2) and use the left/right arrows to navigate to the next Portfolio Item, i don’t get the right sequence order, as set in the Masonry – Date Ascending.How can i fix that?
Thanks!February 27, 2018 at 10:37 pm #918689Hey 100f,
Please take a look here
let us know if it works properly after you try it.
Best regards,
BasilisFebruary 28, 2018 at 7:17 pm #919229Hey Basilis!
Thanks, but it does not help.
It sets the Next/Previous in the same category and thats fine..
But It is about the right sequence order, as set in the Masonry – Date Ascending, and this have not changed.Best Regards
BorisMarch 2, 2018 at 10:22 am #920191Hi,
Do you want to reverse the sequence of the next and previous posts? Please try this filter.
add_filter('avia_post_nav_entries', 'avia_post_nav_entries_mod'); function avia_post_nav_entries_mod($entries, $settings) { if(is_singular('portfolio')) { $entries['prev'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], 'portfolio_entries'); $entries['next'] = get_next_post($settings['same_category'], $settings['excluded_terms'], 'portfolio_entries'); } return $settings; }
Best regards,
IsmaelMarch 9, 2018 at 3:54 pm #924569Hi!
Sorry, but this does not work at all. I just want the Next/Prev to have the same order as displayed on the overview Page:The right sequence order is, as set in the Masonry – Date Ascending.
Thanks.
March 12, 2018 at 7:18 pm #925671Guys?
March 13, 2018 at 9:13 pm #926238Hi,
I am afraid the problem is that we are not sure what you exactly need.
What is not working and how it should work for you.Best regards,
BasilisMarch 14, 2018 at 3:21 pm #926647Hi!
All right. I will try to be clearer.
There is an order to the Pianos on the overview, right?It’s Modell D, C, A, B and so on. This order is important. To keep it i have set the single portfolio items with the right publish date and i have set the Masonry in the overview page to sort the Pianos to ‘Date Ascending’.
I want to keep the same order ( Modell D, C, A, B…) when i open a single Item and klick on the ‘next/previous’ buttons.
Thank you.
March 15, 2018 at 8:50 pm #927676Hi,
Hm, that is strange.
If you change the date, then that should be the order.
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( do be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create a admin user and post the login credentials in the “private data” field.Best regards,
BasilisMarch 16, 2018 at 4:37 pm #928164Thank you!
There you go:
March 20, 2018 at 3:14 am #929480Hi,
The navigation is based from “get_adjacent_post” function. This function retrieves posts based on the date they are published. Please edit the posts then adjust the Publish > “Published on” date manually.
Best regards,
IsmaelApril 3, 2018 at 9:19 pm #936795Hi,
yes, as i said, i have all ready set the right publish date right inside the respective categories.
It still does not work.
I want to keep the same order ( Modell D, C, A, B…) when i open a single Item and klick on the ‘next/previous’ buttons.
The models (portfolio items) have all ready the right publish date. As you can see in the category overview page.
So could i please get some help?
Thank you!April 5, 2018 at 10:54 am #937588Hi,
Please regenerate the login token because the previous one has expired. Did you install the “post-types-order” plugin?
Best regards,
IsmaelApril 5, 2018 at 1:07 pm #937696Hi, no, i dont have this plug in installed.
New token is in the private area.
Thanks!
April 7, 2018 at 3:40 am #938472Hi,
Thank you for the update. The setup and date of the portfolio items look correct. I’m not sure why it’s not arranging itself correctly. Please upgrade the theme from version 4.2 to version 4.2.6 and then update WordPress to 4.9.4.
Best regards,
IsmaelApril 13, 2018 at 3:18 pm #941544Hi, i did the Update.
It does not help.
Please help!April 14, 2018 at 5:44 am #941810Hi,
It seems like the login token has expired, could you generate a new one or post temporary admin login details in private please?
Best regards,
RikardApril 14, 2018 at 1:37 pm #941914Hi! Sure!
April 16, 2018 at 3:59 pm #942629Hi,
Thank you for the info. I tried to alter the query of the adjacent post but I can’t figure out the correct pattern. I’ll ask the rest of the support team to check this out.
Best regards,
IsmaelMay 5, 2018 at 10:08 pm #952175Guys?
May 8, 2018 at 4:52 am #953052Hi,
I’m sorry but we haven’t figured this out yet. Please provide a login token again.
Best regards,
IsmaelMay 9, 2018 at 1:38 pm #953915Hi!
There you go:May 10, 2018 at 4:17 pm #954635Hi,
We managed to fixed it with the following filter but that query is quite specific for the category “Klaviere Blüthner”. You may need to duplicate the filter for the rest of the portfolio categories.
function avf_previous_post_where() { global $post, $wpdb; return $wpdb->prepare( "WHERE p.post_date < %s AND p.post_type = %s AND tt.term_id IN ('37') AND p.post_status = 'publish'", $post->post_date, $post->post_type); } add_filter( 'get_previous_post_where', 'avf_previous_post_where' ); function avf_next_post_where() { global $post, $wpdb; return $wpdb->prepare( "WHERE p.post_date > %s AND p.post_type = %s AND tt.term_id IN ('37') AND p.post_status = 'publish'", $post->post_date, $post->post_type); } add_filter( 'get_next_post_where', 'avf_next_post_where' ); function avf_previous_post_sort() { return "ORDER BY p.post_date desc LIMIT 1"; } add_filter( 'get_previous_post_sort', 'avf_previous_post_sort' ); function avf_next_post_sort() { return "ORDER BY p.post_date asc LIMIT 1"; } add_filter( 'get_next_post_sort', 'avf_next_post_sort' );
Best regards,
IsmaelMay 25, 2018 at 3:38 pm #962204Thank you Ismael!
Where and how should i put the script to apply it to all categories?
Best regards.May 28, 2018 at 11:52 am #963089Hi 100f,
This code needs to be inserted into the functions.php and it better be a child theme.
If you need further assistance please let us know.
Best regards,
VictoriaJune 13, 2018 at 1:05 am #971974Hi, thanks.
Yes, i need further assistance. How can i make this code apply to all categories?
The right order works now in only one category.
And they are several of them?
Thank you.June 13, 2018 at 1:09 am #971976Should i copy the code repeatedly and only change the category ID in each copy? In this case its (’37’)…
June 14, 2018 at 4:44 am #972603Hi,
I don’t think that we can apply this filter for every category. The nav’s “same_category” parameter should post no issue when the portfolio items belong to a single category. The portfolio items in your installation contains multiple categories so we may not be able to exclude certain items from the post navigation.
Please provide a login token so that we can check the portfolio items again.
Best regards,
IsmaelJune 15, 2018 at 12:25 pm #973276Hi!
there you go!
Thanks!June 18, 2018 at 4:20 am #974076 -
AuthorPosts
- You must be logged in to reply to this topic.