Tagged: portfolio items
-
AuthorPosts
-
July 1, 2015 at 9:41 am #466857
Hi there,
Long time no see :)
I have a travel blog. My portfolio items are the countries I visited. When I visit a new country I create a new item in which all my posts about this country are listed in a masonry. Problem is that these portfolio items are not sorted in alphabetical order. Example: I create France, Australia, Germany in that order. Whenever one is on the France page, when clicking on the arrow on the right hand side (“next”) it goes to Australia page. It makes sense as Australia was created after France. But it doesn’t make sense for the reader who might be expecting an alphabetical order.
How can I sort my portfolio items in alphabetical order?
Many thanks for your help :)
July 2, 2015 at 2:51 pm #467531Hi iclo!
Did you try to edit the element and select to sort by title in the Order by option?
Cheers!
RikardJuly 2, 2015 at 5:22 pm #467652I would like to know how to do this too. Can you explain where the Order By option is? It does not appear in the Portfolio element if the Avia layout builder editor.
- This reply was modified 9 years, 4 months ago by cult.
July 2, 2015 at 8:28 pm #467747Thanks for your reply Rikard.
However I’m not sure we’re speaking about the same thing. Where can I find the Order by option?
I’m actually speaking about the portfolio page itself (not what could be inside the page).
July 6, 2015 at 11:30 am #468808Hey!
Edit the masonry element inside the page then you’ll find the “Order by” settings. You can set it to “Title”. You have to adjust the “Display order” settings as well. Make sure that you have the latest version of the theme which is 3.2.1.
Regards,
IsmaelJuly 6, 2015 at 11:57 am #468820Hi Ismael,
Once again, I’m sorry but we’re not speaking about the same thing.
I’m not speaking about portfolio items in a masonry element. I’m speaking about sorting the portfolio pages.
On a portfolio page there are 2 arrows on the sides in order to navigate from an item to another (just like in a regular blog post). I would like to sort these pages in alphabetical order.
Example: I create France, Australia, Germany in that order. Whenever one is on the France page, when clicking on the arrow on the right hand side (“next”) it goes to Australia page. Then it goes to Germany. It makes sense as Australia was created after France and Germany after Australia. But it doesn’t make sense for the reader who is expecting an alphabetical order.
Once on Australia page, I’d like to go to France page when clicking on the arrow on the right hand side, then to Germany page.Do you understand better?
- This reply was modified 9 years, 4 months ago by iclo.
July 7, 2015 at 11:46 am #469559Hi!
you can find a tutorial on how to do it here: http://kriesi.at/documentation/enfold/change-the-sort-order-of-portfolio-elements/
Hope this helps!
Cheers!
AndyJuly 7, 2015 at 9:18 pm #469930Andy it seems to be exactly what I was looking for. I added the code mentioned in the tutorial but it doesn’t seem to work. I use Functionality plugin to help me doing that. Any clue why it’s not working?
July 7, 2015 at 10:13 pm #469957Hi!
Can you bypass the plugin and try add it to the functions.php file?
Best regards,
BasilisAugust 12, 2015 at 5:08 pm #486684Hi guys,
same problem (and I’m not using Functionality plugin): The solution at http://kriesi.at/documentation/enfold/change-the-sort-order-of-portfolio-elements/ does not work in my child functions.php. But – isn’t it only for the sort order in grids?
As Iclo I need to sort not a grid or a masonry f.e. in alphabetical oder, but the sequence of the single portfolio items, the user can skim through with the both arrows (called class=”avia-post-nav avia-post-prev with-image”) on the left and right side on every single portfolio page.
Thanks for any help
Stephan- This reply was modified 9 years, 3 months ago by Yeti.
August 13, 2015 at 1:47 pm #487184Ok… got it, it’s a little screw in WP, not in Enfold: Posts and also Portfolio items can be ordered by that Plugin http://wordpress.org/extend/plugins/post-types-order/.
But it’ hard to nibble with the drag’n’drop method, when you have hundreds of posts or items…Bye and keep care. God save Enfold ;-)
StephanUPDATE…
F***, that plugin overrides globally all individual selected sort options of each Masonry (content element).
So sorry, but back to the question: Any solution?- This reply was modified 9 years, 3 months ago by Yeti. Reason: Update
August 14, 2015 at 7:29 pm #487915Hey Yeti!
the tutorial is for sorting portfolio elements, not grids. So it should work in your case as well. Are you sure you implemented everything correct? Can you provide us admin access and show us a link with your portfolio elements in question?
Cheers!
AndyAugust 18, 2015 at 5:50 pm #489639Hi Andy,
I tried it again, but the function custom_post_grid_query in my child functions.php (as described in the
http://kriesi.at/documentation/enfold/change-the-sort-order-of-portfolio-elements/) has no effect. I also deactivated the plugin “Post Types Order” for testing.But the items in the single item view (I’m opening them in an iframe) are still sorted by date, when when you click at the prev/next buttons at the left/right. Could you please check that (see private field below)?
And the next big problem: In the masonry options for the pagination, I selected Show “Load More” Button. After clicking that button, at the top of the masonry there a suddenly shown all existing categories, but not only the ones I selected in the masonry options. I think, thats definitly a bug… Any solution?
Thanks a lot for your assistance!
Cheers, Stephan- This reply was modified 9 years, 3 months ago by Yeti. Reason: wrong shortcode
August 20, 2015 at 10:38 pm #491106PS: Same problem after updating to WP 4.3 and Enfold 3.3
Any clue?August 24, 2015 at 3:28 am #491987Hey!
I’m sorry but the avia_post_nav function is based on the get_previous_post and get_next_post functions which only retrieves adjacent posts. WordPress posts are designed to display in reverse chronological order (from newest to oldest) which means that the function can only fetch entries base on date the post was created. If you want to fetch the post by title, you will need to modify the avia_post_nav in the functions-enfold.php file. Please hire a freelance developer or contact codeable: http://kriesi.at/contact/customization
Best regards,
IsmaelAugust 24, 2015 at 4:36 am #492001Hey Ismael,
ok, thanks. In the forum conversations (f.e. Andy said “it should work in your case”) I couldn’t realize, that the function custom_post_grid_query is just not for that case… And I didn’t expect, that portfolio itemes (in difference to normal posts) can only be ordered by date for prev/next.
So I’ll try it with the post types order plugin again…
But the other issue still exists:
In the masonry options for the pagination, I selected Show “Load More” Button at the bottom. After clicking that button, at the top of the masonry there a suddenly shown all existing categories, but not only the ones I selected in the masonry options. I think, that’s definitly a bug… Any solution?Best regards
StephanAugust 25, 2015 at 6:35 am #492633Hi!
Can you please provide a list of portfolio items that should no be included in the page? 2 to 3 examples of the portfolio items will do.
Best regards,
IsmaelAugust 25, 2015 at 10:46 am #492766Hi Ismael,
all items are the right ones; they are from the chosen categories. But after clicking “Load more”, suddenly not only the selected categories are shown above the items, but also all other categories of the shown items. (fyi: the 2003-2014 cats are the year, a picture / item was painted)
You can see the issue in the screenshots:
Thanx & best regards
StephanAugust 26, 2015 at 11:38 am #493448Hi!
I checked your masonry gallery and when I click for example on “Stillleben” and then on “load more” button, I get some more still life and nothing else. Same happens for other categories. So it seems to work fine for me. Could you fix it already?
Regards,
AndyAugust 26, 2015 at 12:13 pm #493480Hi Andy,
no, the images are the right ones, but the categories are not the ones, I selected in the masonry options. The masonry headline lists all existing categories, even those, which have never been selected. That’s the problem – and doesn’t make any sense:
Regards
StephanAugust 26, 2015 at 12:57 pm #493509Hey!
thanks for the screenshots, now I see what you mean. I think there is a conflict between a plugin. Try to deactivate all of them to check if things get better for you.
Cheers!
AndyAugust 26, 2015 at 3:36 pm #493614Hi Andy,
even after deactivating all plugins (really all, also cache), the problem remains the same.Cheers,
StephanPS: Inbetween, I reactivated the plugins again to to continue to work.
August 27, 2015 at 10:18 am #493992Hi!
then I think there are some corrupted files and in this case you need to delete all theme files via FTP before getting a fresh copy from your themeforest account.
Cheers!
AndySeptember 1, 2015 at 1:36 am #496166Hi Andy,
unfortunately that did not help. I deleted all files in the theme folder, took the newest Enfold (3.3.2.) from Themeforest, uploaded all files via Filezilla with zero transfer errors – but the bug still exists.I also tried it with a “fresh” page and a new masonry with other Portfolio enties / categories – with the same effect.
And I have the same problem on another website (built with WP 4.2.4 with EnfoldVersion: 3.2.3). So I think, this is not a singular problem.
By the way: While searching for other examples, I saw that your demo portfolio at http://kriesi.at/themes/enfold-photography/portfolio/ does not work at all. It shows an empty content area beneath the navigation sidebar.
Cheers,
StephanSeptember 1, 2015 at 5:36 pm #496576Hey!
I reported this issue to Kriesi and let’s hope he can find a fix for it soon. Thanks for making us aware about it and thanks for being patient.
Cheers!
AndySeptember 7, 2015 at 7:10 pm #499489Hi Andy,
for your info: there’s a second issue with that masonry listing – perhaps they have to do with each other: When a portfolio item has some revisions, often there will be listed the original plus a second (this without the featured image) in the masonry. Using the plug “Optimize Database after Deleting Revisions” will help, but its certainly not the final solution…
Cheers, Stephan
September 8, 2015 at 9:36 pm #500105Hi!
thanks. I think Kriesi will implement a fix for it in a future update.
Cheers!
AndyJuly 8, 2017 at 3:36 pm #818178Hi guys,
still after two years, the error as shown above in the screensshot isn’t fixed. Did you forget us?
Thanx for an answer,
StephanJuly 11, 2017 at 10:16 am #819199Hi,
Thank you for the update.
We found a filter that can change the the previous and next posts query by alphabetical order.
function avf_previous_post_where() { global $post, $wpdb; return $wpdb->prepare( "WHERE p.post_title < %s AND p.post_type = %s AND p.post_status = 'publish'", $post->post_title, $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_title > %s AND p.post_type = %s AND p.post_status = 'publish'", $post->post_title, $post->post_type); } add_filter( 'get_next_post_where', 'avf_next_post_where' ); function avf_previous_post_sort() { return "ORDER BY p.post_title desc LIMIT 1"; } add_filter( 'get_previous_post_sort', 'avf_previous_post_sort' ); function avf_next_post_sort() { return "ORDER BY p.post_title asc LIMIT 1"; } add_filter( 'get_next_post_sort', 'avf_next_post_sort' );
Best regards,
IsmaelJuly 17, 2017 at 2:16 pm #822617Hi Ismael,
the problem is not the sorting of the posts. The problem are (as described) the wrong categories:
The categories shown after cllicking “Load more / Mehr laden” are not the ones, I selected in the masonry options. After clicking, the masonry headline suddenly lists ALL EXISTING (!) categories – even those, which have never been selected in the masonry options.
That’s the bug – please see the screenshot above from August 26, 2015 at 12:13 pm.
Thanx, Stephan
-
AuthorPosts
- You must be logged in to reply to this topic.