Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1098075

    Hallo,
    ich habe mit WooCommerce einen Shop angelegt. Auf jeder Produktseite gibt es oben links und rechts jeweils einen Button mit Pfeil. Wenn man mit der Maus darüber fährt, öffnet sich ein kleines Fenster mit der Vorschau auf das nächste Produkt, das bei Mausklick geöffnet wird.
    Meine Frage ist: wie kann ich die Produkte und die Reihenfolge auswählen? Bisher scheint die Produktreihenfolge ziemlich willkürlich.
    Danke und viele Grüße

    #1099441

    Hey Oliver,

    Can you please post in English?

    Best regards,
    Basilis

    #1100017

    Hi Basilis,
    ok, I will try.
    I have started a shop with WooCommerce. At the top of every product-page there are 2 buttons on the left and right side with an arrow. Going with the mouse over the button, a window is opening that shows a product-page that opens when clicking on it.
    My question is: how can I decide the order of the products? Now it is not the order of the products in the menu.
    Thanks and best regards,
    Oliver

    #1100393
    #1101040

    Hi Victoria,
    thank you.
    Unfortunately I can not find an answer to my question in these articles.
    Can you tell me, how I can decide the order of the products?
    Thanks and best regards,
    Oliver

    #1102089

    Hi Oliver,

    Please have a look at this thread:

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1102843

    Hi Victoria,
    thank you. Unfortunately I can not find a solution for my problem. Could you maybe answer to my question for yourself or is my problem very complicated? Thanks.
    Best regards
    Oliver

    #1104385

    Hi,

    Sorry for the confusion.

    The post or product navigation is created using the “get_adjacent_post” function and as the name suggests, it retrieves the next/previous post. The default order is by date, but you can use the “get_{$adjacent}_post_sort” filter to change it. The $adjacent refers to the type of adjacency, which is either “next” or “previous”.

    Example:

    function avf_get_previous_post_sort_mod( $sort ) {
    	if ( 'product' === get_post_type() )
    		return "ORDER BY p.post_title DESC LIMIT 1";
    	else
    		return $sort;
    }
    add_filter( 'get_previous_post_sort', 'avf_get_previous_post_sort_mod' );

    That should sort the previous post by title instead of date.

    Best regards,
    Ismael

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