Viewing 1 post (of 1 total)
  • Author
    Posts
  • #1210634

    Hello, sorry but I cannot find details on this, so having to add to the many posts/questions!

    I have latest WP and Enfold, with Enfold-child setup and working fine.

    I am trying to achieve the following:
    1. Modify the standard posts query to include future posts as well as published so these are shown as a list and you can also view as single().
    – is the best way to modify the hooks via functions.php to do this, or by setting up a new template and hard coding the query in there?
    I ask this since it seems the standard hooks such as this don’t work

    add_filter(‘get_post_status’, function($post_status, $post) {
    if ($post->post_type == ‘post’ && $post_status == ‘future’) {
    return “publish”;
    }
    return $post_status;
    }, 10, 2);

    2. I have custom post type ‘event’ and would like to include this into the query also, what is the best way to do this through enfold so that I can use the Layout Builder with this CPT also.

    Many thanks

    Philip

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.