• joshymerki

    (@joshymerki)


    I have a site with Elementor. On there I have a custom ordering for the posts.

    It orders them to a meta_value. But the Plugin from you is messing up that Order.

    The END SQL looks like this:

    SELECT
    *
    FROM
    wp_posts
    LEFT JOIN wp_postmeta ON (
    wp_posts.ID = wp_postmeta.post_id
    AND wp_postmeta.meta_key = '_whp_hide_on_frontpage'
    )
    LEFT JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id)
    WHERE
    1 = 1
    AND wp_posts.ID NOT IN (11412)
    AND (
    wp_postmeta.post_id IS NULL
    AND (
    (
    mt1.meta_key = 'start'
    AND mt1.meta_value >= '2025-01-10 12:00:00'
    )
    )
    )
    AND wp_posts.post_type = 'event'
    AND ((wp_posts.post_status = 'publish'))
    GROUP BY
    wp_posts.ID
    ORDER BY
    wp_postmeta.meta_value ASC
    LIMIT
    0, 4;

    The Problem here is that it not gets ordered by mt1.meta_value instead it gets ordered by wp_postmeta.meta_value which is random because the value of all fields should be NULL.

    If you have any questions about the site or something else that will help you let me know.

    PS: Otherwise it’s a very great Plugin.

  • You must be logged in to reply to this topic.