Skip to content

Commit

Permalink
Add support for post_name or post_name__in #199
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Mar 19, 2022
1 parent c2e0139 commit b3c1fa0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions includes/bw_posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,15 @@ function bw_get_posts( $atts=null ) {
//
// Note: This supports multiple IDs, comma separated
$attr['exclude'] = bw_array_get_dcb( $attr, "exclude", NULL, "bw_current_post_id" );

/*
* Support a post_name attribute
*/
$post_name = bw_array_get_from( $atts, ["post_name","post_name__in"], null );
if ( $post_name ) {
$attr['post_name__in'] = bw_as_array( $post_name );
}


// set suppress_filters to false when global bw_filters is set
global $bw_filter;
Expand Down

0 comments on commit b3c1fa0

Please sign in to comment.