Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #46671, comment 7


Ignore:
Timestamp:
04/16/2020 08:48:34 AM (5 years ago)
Author:
tofandel
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #46671, comment 7

    v1 v2  
    55global $wp_query;
    66
    7 $wp_query->posts = [$parent];
    8 $wp_query->post = $parent;
    9 setup_postdata($parent);
     7$post = $parent;
     8$wp_query->posts = [$post];
     9$wp_query->post = $post;
     10setup_postdata($post);
    1011}}}
    1112