Support

Account

Home Forums General Issues Issue getting options from pre_get_posts filter Reply To: Issue getting options from pre_get_posts filter

  • its pre_get_posts, it doesnt return or log anything on the error logs because it gives an error 500 each time I use it. I used the same code on a template file(ie. single.php) and the same code returns an array of post ids. Its only on pre_get_posts on functions.php that the code behaves differently.

    FYI

    I updated this to fetch a custom field on the post and not the options, get_field still doesnt function properly inside pre_get_posts, I used get_post_meta instead and it worked. Maybe get_field doesnt work around the time pre_get_posts is being called?