Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #1143377

    Liebes Kriesi Team,

    ich habe eine Galerie mit verschiedenen Kunstwerken angelegt. Verwendet habe ich dafür das Protfolio Raster.
    Es gibt zwei verschiedene Kategorien (“Bilder” und “Papierobjekte”) auf der Seite.
    Wenn ich eine bestimmte Kategorie wähle wird mir die Bildauswahl korrekt angezeigt – zum Beispiel nur alle Bilder.
    Und wenn ich auf ein Bild klicke, wird es auf einer eigenen Seite angezeigt. So wie ich es im Portfolio Raster unter Link-Handhabung ausgewählt habe.
    Das Problem ist, wenn ich durch diese Kategorie navigieren möchte funktioniert das nicht richtig. Die Navigation verhält sich so als würde ich durch alle Kategorien (“Alle Werke”) navigieren.
    Ich habe schon recherchiert, auch hier im Forum, aber nichts gefunden was mir wirklich weiter hilft.
    Gibt es eine Möglichkeit nur durch die Kunstwerke der ausgewählten Kategorie zu navigieren?
    Ich freue mich auf euer feedback.

    Vielen Dank und viele Grüße
    Sabine

    #1144121

    Hey Sabine,

    Thanks for contacting us!

    Would you like to display the posts from the same category in post nav? If so, please add following code to bottom of Functions.php file in Appearance > Editor

    add_filter( 'avia_post_nav_settings', 'enfold_customization_same_cat' );
    function enfold_customization_same_cat( $s ) {
    	$s['same_category'] = true;
    	return $s;
    }

    Best regards,
    Yigit

    #1144130

    don’t know if the code above still works for the Enfold 4.6.x generation;
    Test it – if not:

    since 4.6.2 i use this for same category ( portfolio and post )

    add_filter('avf_post_nav_settings','enfold_customization_postnav', 10, 1);
    function enfold_customization_postnav($settings){
    	$settings['same_category'] = true;
    	$settings['is_fullwidth'] = false;
    	if( 'portfolio' == $settings['type'] )  { $settings['skip_output'] = false;}
    	if( 'post' == $settings['type'] )  { $settings['skip_output'] = false;}
    	return $settings;
    }

    Günter has send me a different code (with more options):

    function my_avf_post_nav_settings( array $settings ){
      if( true === $settings['is_hierarchical'] ){
        $settings['skip_output'] = true;
        return $settings;
      } 
      if( ! in_array( $settings['type'], array( 'post', 'portfolio' ) ) ){
        $settings['skip_output'] = false;
        return $settings;
      }
      $settings['same_category'] = true;
      $settings['is_fullwidth'] = false;
      $settings['skip_output'] = false; 
      return $settings;
    }
    add_filter( 'avf_post_nav_settings', 'my_avf_post_nav_settings', 10, 1 );
    #1144133

    Hi,


    @Guenni007
    Thanks for sharing! :)

    Best regards,
    Yigit

    #1144600

    Hey Yigit,

    Yes thanks, that’s what I wanted to do.

    The solution you’ve send me is nearly perfect.
    But if I insert the code, the “All”-button (All categories) don’t work in the right way any more. If I am on the gallery overview and have not selected a category and then choose any picture from the gallery overview, only the pictures of that category will be shown in the single view. So not all pictures.

    I look forward to an answer.

    Best regards,
    Sabine

    P.S. Many thanks also to you Guenni007.

    #1145224

    please try the first code instead – i posted here – and on Enfold Child – Blog Layout – Single Post Navigation : an try Loop Post Navigation.
    I tested it on a customer site – even if i inserted that code above the side navigation only stays in same “category” and the Sorting in Masonry the Portfolios works well.
    https://webers-testseite.de/lepper/portfolio-alle/

    • This reply was modified 6 years ago by Guenni007.
    #1145957

    Hey Guenni007,

    Thanks for your advice.
    In my case it didn’t work unfortunately.
    Maybe it’s because I don’t use Masonry but Portfolio Grid?

    Yigit, do you have any advice for me? I don’t know what to do.

    I look forward to your answer.

    Best regards,
    Sabine

    #1146182

    Well – under the Masonry there is the Grid – and that worked too.

    #1146290

    Hey Yigit,

    the advice from Guenni007 didn’t work.
    And I don’t know what to do.
    Do you have any advice for me?

    Best regards,
    Sabine

    #1147571

    Hey Guenni007,

    I have noticed that the “All” button on your customer website does not work either.
    Here you also get “stuck” in a certain category. So in your case – window, glass, etc..
    A cross-category navigation is unfortunately not possible.

    Best regards,
    Sabine

    #1147656

    Hi!

    Sorry for the delay. Where can we see the issue? Please provide a link to the actual page with the Portfolio Grid element. The code above should not have affected the category sort buttons.

    Regards,
    Ismael

    #1147818

    Hi Ismael,

    Thanks for your answer.
    I send you the link to the actual page with the Portfolio Grid element as private content.
    I’m looking forward to your feedback.

    Best regards
    Sabine

    #1148253

    Hi,

    Thank you for the update.

    We can’t see any issue with the category sort buttons. They are working properly. How can we reproduce the issue?

    Best regards,
    Ismael

    #1149235

    Hey Ismael,

    Thank you for your reply.
    So that you can see better what the problem is, I send you a small documentation. I hope this will make it easier to understand.

    If you have any more questions, please let me know.

    Best regards,
    Sabine

    #1149709

    Hi,

    Thank you for the follow-up.

    Are you referring to the single portfolio pages (see private field)? They are displaying the featured image as expected. What are you expecting to see in those pages?

    Best regards,
    Ismael

    #1149962

    Hi Ismael,

    Thank you for your answer.

    My question refers to the overall category “ALLE WERKE”.

    If you are on the “ALLE WERKE” overview and you click on a picture (for example the first picture) you come to the single portfolio pages – so in our case to the first picture in large view. So far so good.

    Now I would expect, if I navigate through the gallery with the “NÄCHSTES” button, that all pictures will be displayed one after the other as they can be seen in the “ALLE WERKE” overview.

    In fact, the behavior is different: some images are skipped. For example, images 3 and 5 (the numbers refer to PDF page two).

    Maybe I explained it better now?

    Thank you and best wishes
    Sabine

    #1150434

    Hi,

    Thank you for the clarification.

    What is the current order of the items in the portfolio grid? Is it by date? Please note that the order of the posts in the post navigation is not directly linked to how they are sort in the main gallery. The navigation, which is based on the get_adjacent_posts function, will contain the adjacent posts based on the date they are published.

    // https://developer.wordpress.org/reference/functions/get_adjacent_post/

    If you want to change the query or sort the adjacent posts by title instead of by date, use this filter in the functions.php file.

    function avf_get_prev_post_sort_mod( $sort ) {
    	return "ORDER BY p.post_title DESC LIMIT 1";
    }
    add_filter( 'get_previous_post_sort', 'avf_get_prev_post_sort_mod' );
    
    function avf_get_next_post_sort_mod( $sort ) {
    	return "ORDER BY p.post_title ASC LIMIT 1";
    }
    add_filter( 'get_next_post_sort', 'avf_get_next_post_sort_mod' );

    Best regards,
    Ismael

    #1150993

    Hey, Ismael,

    Thank you for your answer.

    It is not about the order of the pictures but about the fact that pictures do not appear at any position.

    If you are on the navigation point “GALLERY” all pictures are displayed – this view is correct (please see the link in private content).
    If you now click on a single picture and get into the single view I would expect that I can see all pictures one after the other, if I keep clicking on “NEXT” (“NÄCHSTES”) which are also shown in the overview (the order doesn’t matter for me). But in fact some pictures are not displayed. That’s the problem I mean. Is that so understandable?

    I really hope that the problem can be solved. My customer becomes already impatient.

    Thank you and best wishes
    Sabine

    • This reply was modified 5 years, 11 months ago by feinsdesign.
    #1151184

    Hi,

    Sorry for the confusion. The order of the portfolio items in the post navigation is not really connected with how they are sorted in the portfolio grid or portfolio overview page. In the single portfolio page, the next and previous navigation will contain portfolio items that are adjacent to the current portfolio item based on the date they were published. That is the default order of the items in the post navigation. In the portfolio grid by default, items are sorted by date as well unless the “Order by” settings is set to something else. Did you change the orderby settings?

    Did you apply different categories to the portfolio items? If so, then you should remove the filters that were previously suggested above because they will restrict the post navigation to the category where the current portfolio item belongs. The navigation will only show items that are related to the current portfolio item.

    If you can provide the login details in the private field, we’ll try to inspect the settings and check how the portfolio items are created.

    Best regards,
    Ismael

    #1151611

    Hi Ismael,

    Thank you for your help.

    I have assigned only one category per item (for example: picture 1 is assigned to the category “BILDER”).
    If I remove the recommended filter I come back to the original problem, which is that the “ALLE WERKE” category is correct, but the other two are not correct, because then all images are always displayed in each category.
    I would like to accept your offer that you look at the page.

    Thank you very much
    Sabine

    #1151773

    Hi,

    Thank you for the update.

    Are you expecting the post navigation to display only the items that are visible in the portfolio overview page when they are filtered using the sort buttons? You seem to be expecting the navigation to correlate with how the items are ordered in the portfolio overview page. That is not how it works, unfortunately. The post navigation has nothing to do with the category sort — they are not connected at all. If you want the post navigation to contain the posts in the order they are sorted in the portfolio overview page when “ALLE WERKE” is active, then you can either remove the filter that we previously suggested above or make sure that the items are in the same category, and leave the filter.

    Unfortunately, we can’t do anything to change that limitation without major modification in the theme. You can either hire a freelance developer to change how the post navigation works and make it respond to the category sort button in the portfolio overview page, or follow the suggestions above and accept the limitations.

    Best regards,
    Ismael

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