• Resolved alanaj7

    (@alanaj7)


    Hello. Is it possible to add custom CSS that will allow us to keep sticky posts “pinned” to the top of the Latest Posts widget? Or include this feature in the block/ widget? Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @alanaj7, Only CSS is not enough to keep the sticky post pinned to the top. You can use a custom query to keep pinned. There are also many sticky plugins that you can try. Hope this helps.

    Moderator threadi

    (@threadi)

    The “Latest Posts” block does exactly what it says: it only displays the latest posts, regardless of how they are marked.

    If you want to use the sticky tag for posts, I would recommend the Query Loop block instead, see: https://ww.wp.xz.cn/documentation/article/query-loop-block/ – this also takes the sticky tag for posts into account by default. I was just able to test this out myself.

    Thread Starter alanaj7

    (@alanaj7)

    Hi @asadullah96

    Thank you for responding! I am currently using the Recent Posts Widget with Thumbnails (which does accomplish my objective of pinning the sticky posts). I prefer the display appearance of the Gutenberg Latest Posts block, and was hoping to pin the sticky posts without using a plugin.

    I’m not an experienced coder, but will definitely look into your suggestion with the custom query.

    Thanks again, and have a great week ahead!

    Moderator threadi

    (@threadi)

    The query block does not require any coding. Simply review the options and customize the template according to your preferences. I believe it could appear similar to the “Latest Block.”

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Gutenberg Latest Posts Block’ is closed to new replies.