Viewing 30 posts - 1 through 30 (of 31 total)
  • Author
    Posts
  • #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 :)

    #467531

    Hi iclo!

    Did you try to edit the element and select to sort by title in the Order by option?

    Cheers!
    Rikard

    #467652

    I 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.
    #467747

    Thanks 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).

    #468808

    Hey!

    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,
    Ismael

    #468820

    Hi 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.
    #469559

    Hi!

    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!
    Andy

    #469930

    Andy 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?

    #469957

    Hi!

    Can you bypass the plugin and try add it to the functions.php file?

    Best regards,
    Basilis

    #486684

    Hi 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.
    #487184

    Ok… 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 ;-)
    Stephan

    UPDATE…
    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
    #487915

    Hey 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!
    Andy

    #489639

    Hi 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
    #491106

    PS: Same problem after updating to WP 4.3 and Enfold 3.3
    Any clue?

    #491987

    Hey!

    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,
    Ismael

    #492001

    Hey 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
    Stephan

    #492633

    Hi!

    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,
    Ismael

    #492766

    Hi 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:
    screenshot

    Thanx & best regards
    Stephan

    #493448

    Hi!

    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,
    Andy

    #493480

    Hi 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:
    Masonry categories error

    Regards
    Stephan

    #493509

    Hey!

    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!
    Andy

    #493614

    Hi Andy,
    even after deactivating all plugins (really all, also cache), the problem remains the same.

    Cheers,
    Stephan

    PS: Inbetween, I reactivated the plugins again to to continue to work.

    #493992

    Hi!

    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!
    Andy

    #496166

    Hi 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,
    Stephan

    #496576

    Hey!

    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!
    Andy

    #499489

    Hi 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

    #500105

    Hi!

    thanks. I think Kriesi will implement a fix for it in a future update.

    Cheers!
    Andy

    #818178

    Hi guys,

    still after two years, the error as shown above in the screensshot isn’t fixed. Did you forget us?

    Thanx for an answer,
    Stephan

    #819199

    Hi,

    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,
    Ismael

    #822617

    Hi 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

Viewing 30 posts - 1 through 30 (of 31 total)
  • You must be logged in to reply to this topic.