Aleš Sýkora wrote

How to ignore sticky posts in Oxygen repeater?

6. 9. 2021 in

If you create WordPress query with Oxygen Builder’s repeater element, then you propably want to ignore sticky posts sometimes. This is how you can do that with advanced query builder.

You have two options of ignoring sticky posts:

  1. Ignore them from display pinned on the top, but display them in results of query
  2. Do not display them at all

Ignore sticky posts from display pinned on the top, but display them in results of query

Set up your query post_type and add the ignore_sticky_posts with value true.

Advanced query builder in Oxygen with sticky posts ignored.

Hide sticky posts completely

If you don’t want display sticky posts from the query, you need to use post__not_in function.

post__not_in' => get_option("sticky_posts"),

Which in oxygen should be something like:

I did not test it yet, but it should be working.

That’s all you need to do for disabling the sticky posts in WordPress query with Oxygen.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

More from category
Aleš Sýkora wrote
Make slow YouTube embed faster with Toolset
12. 11. 2018 in
Speed up your Toolset website with YouTube embeded videos. Load them faster in a minute. Try it right with this tutorial.
Read More
Aleš Sýkora wrote
Add placeholder to the search form in Views
26. 7. 2018 in
Learn how to show a placeholder text in the search field made with Toolset Views via custom jQuery.
Read More
Aleš Sýkora wrote
Use ACF Repeater as Shortcode in Gutenberg with custom code
22. 3. 2021 in
When Gutenberg editor came to the scene I was trully in love with Toolset Types and Views. Then everything changed. I start playing with Oxygen builder and found a toolset as “too much” for my sites. Especially with all the scripts and bloat which Toolset uses. So I changed my mindset and now, I try […]
Read More
magnifiercross linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram