Hi Sally,
Thanks for testing the new version. I did not realize the exclude argument was missing! It’s slightly tricky, because WP_Query does not (for obvious reasons) allow for include and exclude at the same time.
I just updated the plugin on GitHub (download here) to have an exclude parameter. Can you give it a try and let me know if it works correctly for you?
Thanks!
Mike
Thread Starter
sally
(@sallyruchman)
Hi Mike,
I download installed the new plugin, where i found the field to exclude the post Ids? Also how can i shown, post Random?
Thanks,
Sally
Thread Starter
sally
(@sallyruchman)
Hi Mike,
can you give me the infos like name of the exclude parameter, and show the Posts Random within the tiles?
Best Regards
Sally
Hi Sally,
The exclude parameter is simply exclude and it expects a list of post IDs, separated by commas. For example:
[wp-tiles exclude="132,752,321"]
You can make the selection of posts random by setting the orderby parameter to rand, eg.:
[wp-tiles exclude="132,752,321" orderby=rand]
(also see the documentation on post ordering here)
Let me know if that worked!
Mike
Thread Starter
sally
(@sallyruchman)
Hi Mike,
thanks, the random parameter works fine. But the exclude don’t work with the new version, was just in the old version working. I have here the whole short code, can you check, maybe is there somehow the error.
[wp-tiles post_type=”post” orderby=”rand” order=”DESC” posts_per_page=”4″ category=”” tag=”” tax_operator=”IN” offset=”0″ post_status=”publish” ignore_sticky_posts=”false” exclude_current_post=”true” grids=”MyGrid” padding=”20″ pagination=”none” exclude”341,357, 399,486,778,1087,1107,1129,1433,1578″]
Thanks
Sally
Hi Sally!
2 things:
1. add a = after exclude in your shortcode.
2. set exclude_current_post to false. It may conflict with the exclude parameter (in the version I just put on Github this is fixed)
Good luck!
Mike
Thread Starter
sally
(@sallyruchman)
Hi Mike,
thanks, i tried it out. If i set exclude_current_post to false, the posts don’t change random anymore, and just the same where displayed. And when change back to true boats where changing random, but the selected IDs where not excluded.
Any other idea?
Thanks
Sally
Hi Sally,
Is does that happen with the latest GitHub version? I walked through the code and can’t really think of a reason why that would happen.. let me know!
Mike
Thread Starter
sally
(@sallyruchman)
Hi Mike,
i installed the latest Github Version, and all works fine now!
Thanks a Lot!
Best Regards
Sally