try to use a conditional statement to wrap the first loop, such as:
if( get_option('sticky_posts') ) : //only do the next part if sticky posts
add the corresponding endif;
after the endif;
of the first loop.
Related Posts:
- Exclude sticky post from main query?
- Set sticky posts schedule (Automatic)
- Add a single featured post to all pages?
- Using categories & “stickyness” together
- Sticky posts on home page, search, tag and archives without plugin
- Display only the most recent sticky post, display other posts in chronological order
- Include sticky posts in ‘Blog pages show at most’ X number of posts?
- How to make all posts in a category sticky?
- Sticky Posts Not Sticking to Top of Category Archive
- Get sticky post from category?
- How to make all posts in a category “unsticky”?
- “Sticky” posts for each category (archive.php)
- Exclude expired sticky posts
- Exclude Sticky posts from Main Query break Pagination
- ignore_sticky_posts in WordPress 3.0.3?
- Stick multiple posts in a single category
- Exclude Current and Sticky Post
- Front page should display only one category of posts including sticky post with custom featured post box
- Sticky posts not working when a specific category is set
- Make sticky post on save
- Sticky post for each category on category pages [duplicate]
- Pin a post to the top of a page, other than the home page
- Why WordPress CMS uses an array in wp_options instead of a field for Sticky posts?
- ignore_sticky_posts not working with word press version 3.9.1
- How to modify query on category pages to show only sticky posts?
- Make posts non-sticky
- How to check a post is sticky or not yet?
- Custom query: how to get the sticky posts first?
- I would like to change the sticky posts label “Featured” to something else
- How to display sticky post with custom html
- How to display sticky or latest published post on the current category page it belongs to?
- Update a post to remove sticky option
- Show image if a post is featured
- I do not want my front page sticky post to show up in a category
- How to display a sticky post inside a div?
- WooThemes Mini Features – modify query_posts to display only sticky_posts
- Category sticky latest
- How do you get sticky posts to work with categories?
- How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?
- Exclude Sticky Posts as everyone!
- Don’t move sticky posts to the first page
- Latest Sticky Posts with Grid Thumbnails for static front page
- Pull posts from all categories if quantity is not met?
- How to display only sticky posts on category pages?
- Remove old sticky post on publish
- Limit Number of Sticky Posts to Show
- get_option(‘sticky_posts’) returns stickies that are in trash
- Display latest sticky post or display nothing
- Create thumbs only when a post is sticky or any other way?
- How can I display only sticky posts from a parent category on the homepage?
- Images for sticky posts
- Force WordPress to Show Pages Instead of Category
- How to change the layout and styling of posts according to their category in WordPress?
- Category page showing posts from all categories
- Exclude Category From Home Page, Display Posts on It’s Own Page?
- How to query all posts of a specific category, and any other category combination
- Page navigation within a category
- Category Descriptions – HTML?
- Assign category using custom field?
- Permalinks – Different structures for different categories?
- Return category slug / title from category ID
- Changing post category from dropdown
- WordPress Multisite – global categories
- Code to pull in a PHP file named after the category ID
- I want to show category in the post title , how can I do
- Custom Post Types and independent Categories – complex Taxonomy
- Category location styling
- Get Tags specific to Category using WooCommerce plugin
- Category archive rewrite rule to include category/subcategory?
- How can I automatically display a visual archive of subcategory posts [and thumbnails] separate from Parent category?
- The default code for “posts_nav_link” on category.php isn’t working
- Woocommerce custom category pages
- Using ajax on editing a category edit page?
- Have multiple category queries from the URL been fixed yet?
- Notice: Trying to get property of non-object in : custom fields category
- Creating links to a page displaying posts from a particular category
- Thumbnail for categories / taxonomies plugin?
- Pagination for query_posts();
- Detect category choice for posts with multiple categories
- wp_insert_link not working
- wp_list_categories : how do I sort by ID when IDs are not sequential
- Showing different posts on category pages
- How to exclude certain categories showing in Gutenberg?
- How to redirect to category page if page does not exists?
- restrict category to only logged in User
- Category and tag urls return 404 error
- Is there any WordPress way to get all categories for some selected posts?
- How to list categories by page id in wordpress
- Removin /page/2 from pagination
- Custom Post type archives / categories give 404
- get parent_category class in loop
- Display all of a post’s categories except the current category
- How to create a category or tag available exclusively to the admins and not to the users?
- wordpress category.php query for featured news item, broken pagination and repeating posts
- wp_insert_post_data filter to set category
- Echo class depending on Parent category
- Query pages by category
- List all authors by matching custom meta data on a category page
- Page view: Sorted by categories
- Show subcategories and hide posts or show posts if not exists subcategories