Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bw_get_posts() - Add support for post_name attr #199

Open
bobbingwide opened this issue Mar 19, 2022 · 2 comments
Open

bw_get_posts() - Add support for post_name attr #199

bobbingwide opened this issue Mar 19, 2022 · 2 comments

Comments

@bobbingwide
Copy link
Owner

In order to document the problems associated with multiple posts with the same post_name field (aka slug ) I need to add support to bw_get_posts() for an attribute called post_name or post_name__in. When set, the query will pass the post_name__in attribute ( as a array of post names) to WP_Query::query().

@bobbingwide
Copy link
Owner Author

bobbingwide commented Mar 22, 2022

Tested manually in herbmiller.me

[bw_table post_type=any post_status=any 
post_name__in=requirements-for-permalink-postname 
fields=title,ID,post_status,post_name,post_type 
exclude=-1 numberposts=-1 posts_per_page=10]

and in oik-plugins

https://www.oik-plugins.com/shortcode_example/bw_pages-with-dynamic-blocks-in-content/

[bw_pages post_type=block_example 
post_name=github-issue-block-example,svg-icon-examples 
format=L/d/C]

@bobbingwide
Copy link
Owner Author

  • Not yet tested for other shortcodes which query posts.
  • Not listed as one of the parameters to the shortcode(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant