WordPress.org

Ready to get started?Download WordPress

Forums

Flexible Posts Widget
[resolved] Stycky posts disappear (5 posts)

  1. EdmundoZ
    Member
    Posted 1 year ago #

    Thank you for the very handy plugin but I am having a problem. If I select any criteria under Taxonomy & Term, sticky posts do not show on top as they do if I do not use any Taxonomy & Term filters. Is this expected behavior? Also, if I want to filter by post format, there is no option to selecte "Standard" post format.

    http://wordpress.org/extend/plugins/flexible-posts-widget/

  2. DaveE
    Member
    Plugin Author

    Posted 1 year ago #

    Hi EdmundoZ,

    Unfortunately, the way that WordPress core handles sticky posts is very, very specific and there isn't an easy way for me me to work around it. The quick answer is yes, adding a tax & term to any WordPress query will ignore the sticky post functionality for that query. This applies to FPW and even writing your own WP_Query directly.

    The way I've worked around this on several projects is to setup two FPW's one right after the other. In the first widget, I've used a simple tag called "sticky" or even created a separate taxonomy & term specifically for this and also set the number of posts to display to 1. This in effect is your "sticky" post. In the second widget, I don't set a widget title so the listing look like it is still part of the previous widget (this may require some minor styling work as well - depending on your theme) and then gotten the regular post results as if they were a continuation of the previous widget, but not including the "sticky" post. Hopefully that makes sense. I realize the explanation is a little difficult.

    As for the Post Formats issue, you're correct. I am missing a "Standard" option. (It's a technical issue with the way the "Standard" post format works in core.) I'll get that fixed in the next release of the plugin. Thanks for bringing that to my attention.

    Cheers,

  3. DaveE
    Member
    Plugin Author

    Posted 1 year ago #

    Hi EdmundoZ,

    Since I haven't heard back from you in over 2 weeks, I'm going to mark this topic as resolved. Please feel free to re-open it if you continue to have questions.

    Thanks!

  4. DaveE
    Member
    Plugin Author

    Posted 1 year ago #

    Hi EdmundoZ,

    Just a heads up that it doesn't work to add "Standard" as a Post Format option. The reason for this is that WordPress doesn't actually create a "Standard" term. Instead, any posts without one of the other formats assigned to it defaults to "Standard." In essence, Standard is the absence of a post format. I can't do a query for: all posts without a post format term AND all posts with the post format "Gallery" (for example). That's not logically possible.

    So, that being said, the best solution will be to use a tag or another taxonomy & term and assign the same term to posts with the "Standard" and another post format. Then, with FPW, just use the tag or tax&term you assigned to all the posts you'd like to show.

    Hopefully that work around will help. Cheers!

  5. EdmundoZ
    Member
    Posted 1 year ago #

    Hi DaveE,

    thank you for the follow up on this matter. I think the workarounds you recommended will take care of most of my needs. Again thanks for the great plugin!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic