• This plugin causes a conflict with many other plugins/themes. More below:

    In the file ‘includes/general-hooks.php’ line number 3843.

    You are using action “pre_get_posts” and the callback function uses below code:
    $post_types = [ 'portfolio', 'post' ];

    You are setting post_type to include portfolio and post, but other plugins or themes can use a different post_type but this is overwriting them.

    Instead please use this code:

    $post_types = [ 'portfolio', $query->get('post_type') ];

    so it returns your post_type portfolio and the original post_type instead of post.

  • The topic ‘Setting pre_get_posts wrong’ is closed to new replies.