Hello,
I’ve tried troubleshooting this for a while, apparently “Sticky posts: Default” works on my website only if no taxonomy filter is used. In fact, according to the documentation the behaviour should be: Default (display sticky posts first)
but as soon as I add a taxonomy filter (for example category:xxxx or post_tag:yyyy) the behaviour of “Default” is exactly the same as “Ignore sticky” (being flagged as sticky or not is not considered for the display order of posts in the carousel).
I’ve tried different combinations of the other carousel settings (for example “dates”, “order by” etc. and apparently the only culprit breaking the sticky functionality is “Taxonomies”)
“Ignore Sticky” and “Exclude sticky” are instead working correctly even if taxonomies filter is active.
I’ve also tried adding a new carousel from scratch, just in case I have some misconfiguration in the one I’m actually using… no difference.
I’ve tried looking on the forum as well, for example I’ve tried the suggestions in this thread (disabling all other plugins, trying a default WP theme): https://siteorigin.com/thread/site-origin-post-carousel-sticky-post-behavior/
I’ve tried updating Site Origin plugins.
Here is the exported code as asked in the other thread (you can look for example at title”: “TEST-CAROUSEL”)
https://pastebin.com/juxvj6nG
Thanks in advance for any help!
Hi Fedcas,
If the Post Query Sticky posts setting is set to Default, the widget will rely on how WordPress handles sticky posts by default. For queries with a taxonomy set, WordPress will only include sticky posts if that sticky post has the same taxonomy. This means that if you set the Post Carousel to only show posts with X tag, the sticky post will require X tag to be listed.
That’s correct if no taxonomy is set.
Kind regards,
Alex
Hi Alex and thanks for your quick response.
The sticky posts I’m talking about have the tag required by the taxonomy,
post 1 (tagged)
post 2 (untagged)
post 3 (tagged, sticky)
post 4 (untagged, sticky)
Expected behaviour:
scenario A (no taxonomy, Sticky posts=Ignore)
post 1 (tagged)
post 2 (untagged)
post 3 (tagged, sticky)
post 4 (untagged, sticky)
scenario B (taxonomy tag filter, Sticky posts=Ignore)
post 1 (tagged)
post 3 (tagged, sticky)
scenario C (no taxonomy, Sticky posts=Default)
post 3 (tagged, sticky)
post 4 (untagged, sticky)
post 1 (tagged)
post 2 (untagged)
scenario D (taxonomy tag filter, Sticky posts=Default)
post 3 (tagged, sticky)
post 1 (tagged)
Actual behaviour:
scenario A (no taxonomy, Sticky posts=Ignore)
post 1 (tagged)
post 2 (untagged)
post 3 (tagged, sticky)
post 4 (untagged, sticky)
scenario B (taxonomy tag filter, Sticky posts=Ignore)
post 1 (tagged)
post 3 (tagged, sticky)
scenario C (no taxonomy, Sticky posts=Default)
post 3 (tagged, sticky)
post 4 (untagged, sticky)
post 1 (tagged)
post 2 (untagged)
scenario D (taxonomy tag filter, Sticky posts=Default)
post 1 (tagged)
post 3 (tagged, sticky)
Isn’t “scenario D – expected behaviour” the one I should get?
And in case the “scenario D – actual behaviour” is actually intended, how could I get the other beaviour I was expecting?
By the way, I’ve just tried adding “ignore_sticky_posts=0” to the “Additional” field, just in case it was active for some reason… again, no difference.
Hi Fedcas,
Thank you for testing, and clarifying your desired ordering. Unfortunately, WordPress won’t order the posts like that when a taxonomy is set. Why it does this isn’t clear, but we don’t make any alterations to how WordPress handles things by default to ensure that the default works like it does by default.
You can alter it to your desired setup using a snippet like the one in this article (referring to the larger snippet – some alterations will be needed as it’s intended for an archive).
Kind regards,
Alex