Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1495074
    Lion
    Guest

    I sent you an email to (Email address hidden if logged out) also…

    #1495113

    Hey Lion,

    Thank you for the report.

    We can’t reproduce the issue on our end. In the Blog Posts element, have you tried configuring the Content > Select Entries options, such as selecting a specific category or taxonomy? We also recommend temporarily disabling the plugins to check if any of them are affecting the post query.

    Best regards,
    Ismael

    #1495121

    Of course, the bug is exclusive to the gryd Layout

    #1495122

    Enfold + Mailter + WPML produces this problem. Currently the only working fix I’ve implemented is:
    /**
    * ========================================
    * FIX Enfold Grid Layout Blog – Mailster – WPML
    * ========================================
    */
    /**
    * 1. Exclude Mailster newsletters from the Enfold blog Grid Layout
    *
    * Issue: WPML adds SQL conditions that include non-translatable post types
    * through an OR clause, causing newsletters to appear in the Grid Layout.
    *
    * Solution: Modify the final SQL query to explicitly exclude ‘newsletter’
    */

    add_filter(‘posts_request’, ‘aiteb_exclude_newsletter_from_blog’, 999, 2);
    function aiteb_exclude_newsletter_from_blog($sql, $query) {
    // Only frontend
    if (!is_admin() && !empty($sql)) {

    // Exclude newsletter adding AND condition
    if (strpos($sql, “wp_posts.post_type”) !== false) {
    $sql = str_replace(
    “WHERE 1=1”,
    “WHERE 1=1 AND wp_posts.post_type != ‘newsletter'”,
    $sql
    );
    }
    }

    return $sql;
    }

    #1495151

    Hi,

    Glad to know that you’ve figured out the issue and we appreciate you sharing the solution. Please let us know if you encounter any more issues or have further questions.

    Have a nice day.

    Best regards,
    Ismael

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Bug Reports – Newsletter Post Type Appearing in Blog Grid Layout’ is closed to new replies.