Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1103925

    Hello,
    I found a bug in your last update with the “magazine” element (maybe the same bug appears on other modules, but I have not tested everything).

    How to reproduce :
    When I use the Magazine Element with default config and I want to show last posts of my unique category “Actualités”, your module show me the list of my ACF Groups (cpt name : acf-field-group)

    After some research, I found that $query array (avia-shortcodes/magazine/magazine.php – line 659) which is sended to WP_Query() contains every Post Types of my website like this

    [post_type] => Array
                    (
                        [post] => post
                        [page] => page
                        [attachment] => attachment
                        [revision] => revision
                        [nav_menu_item] => nav_menu_item
                        [custom_css] => custom_css
                        [customize_changeset] => customize_changeset
                        [oembed_cache] => oembed_cache
                        [user_request] => user_request
                        [wp_block] => wp_block
                        [acf-field-group] => acf-field-group
                        [acf-field] => acf-field
                        [localite] => localite
                        [consignes_tri] => consignes_tri
                        [ambassadeur_tri] => ambassadeur_tri
                        [ambassadeur_compos] => ambassadeur_compos
                        [fiche_identification] => fiche_identification
                        [portfolio] => portfolio
                        [avia_framework_post] => avia_framework_post
                    )

    At the moment, my only way to bypass this bad behaviour was to add a filter on avf_magazine_entries_query and remove bad post_type elements from your query.

    Could you check what’s wrong and make a fix ?
    Let me know if my report were taken into account

    Thanks you in advance,
    Sincerely

    #1105322

    Hey Ikyo,

    Thank you for using Enfold.

    That is the default value of the post_type parameter in the query of the posts elements (magazine, blogs posts, portfolio grid etc). It doesn’t necessarily mean that it will fetch all posts from every post type in the list because the query also contains the “tax_query” parameter.

    // https://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters

    The post types could share the same taxonomy, so this is an easier way to return posts from those post types when necessary.

    Best regards,
    Ismael

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