• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Sticky Post for Categories

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Sticky Post for Categories

This topic is: not resolved

Tagged: code, css, design, featured, html5, post, posts, sticky, trick

  • This topic has 1 reply, 2 voices, and was last updated 7 years, 10 months ago by Lauren @ OnceCoupled.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • May 19, 2015 at 4:21 am #152724
    whiskymac
    Member

    HI Everybody,

    I have created category pages, each with a few different sections and I wanted each section to end with a view all for each specific category.

    For example the category would be kids activities - Underneath would have four related articles - The last article to say view all for this category.

    However when I try to do this 1 - the post which is sticky is staying the the first position and I woudl want it as the last. The post are sorted by date however the sticky post is still showing first even though its not most recent.

    The only category we have done so far is the one with the heading Christmas fun for Kids:
    http://christmastree1.underthechristmastree.co.uk/kids-page/

    Any help and advice would be really appreciated 😀

    http://christmastree1.underthechristmastree.co.uk/kids-page/
    May 22, 2015 at 11:12 am #153288
    Lauren @ OnceCoupled
    Member

    Sticky posts are meant to show first. I'm not sure how you've created this page, but if you're doing a custom query, you can find the answer in the documentation here: https://codex.wordpress.org/Class_Reference/WP_Query#Post_.26_Page_Parameters

    $query = new WP_Query( array( 'post__not_in' => get_option( 'sticky_posts' ) ) );

    Best,
    Lauren


    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble