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
Emoji deleted from ACF field after saving
2. 4. 2021 in
So you have a ACF text field and you are trying to insert emoji to it. For example as a category icon. You add the field, add the emoji, use the PHP code to display the field. And emoji is missing. After that you found that every time you save the page, emoji dissapear from […]
Read More
Aleš Sýkora wrote
Schema Markup for blog post w/ Gogle Tag Manager and Toolset Layouts
30. 7. 2018 in
Boost your technical SEO with Schema.org markup. Easilly use Google Tag Manager with JSON+LD script to tell the browser robots what is your page about!
Read More
Aleš Sýkora wrote
Child posts menu for custom post type parent item
1. 2. 2021 in
This code will help you display menu of childs on current post. For example: Product 1 = parent has those child pages: – Product usage– How to– Disclaimer– Calculator When you put this child items menu in your template, it will show all childs of product 1 on all child pages and also on product […]
Read More
magnifiercross linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram