Tagged Questions
0
votes
1answer
48 views
Exclude current sticky post
I have the following query, trying to fetch the latest sticky posts but exclude the current one:
$sticky = get_option('sticky_posts');
rsort( $sticky );
$sticky = array_slice($sticky, 0, 3);
...
1
vote
1answer
123 views
Ensuring sticky posts are retrieved first (without using two queries)?
I need to maintain pagination for use with infinite scroll.
Is there no way to tell query_posts to retrieve sticky posts first?
It seems to be default behaviour on a standard wordpress blog on the ...
1
vote
1answer
64 views
Schedule Sticky Posts
I'd like to display the most two recent published sticky posts by modifying the primary loop. A simple affair with the following loop.
However, if I schedule a sticky post to be published in the ...
4
votes
1answer
126 views
Limiting query_posts to 1, regardless of sticky post?
As part of my homepage template, using the standard query_posts I'm pulling out 1 post (styled using a different content_part), then an ad, then the rest of the posts. This works fine, except for when ...
0
votes
1answer
110 views
Sticky posts don't show up first in custom loop
I'm using the following query in my frontpage template:
<?php $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
$args=array(
'paged' => ...
1
vote
1answer
388 views
How to make “sticky” pages (and query by them)
I have query_posts() with page_type set as 'page'. Is there any way I can make certain pages appear higher and thus, make them sticky?
0
votes
1answer
151 views
Can't get pagination to work for sticky posts only
I don't get my pagination to work. I need to filter my posts on sticky posts and display only two per page. Tried almost everything but can't get it to work. It is totally ignoring my posts_per_page ...
1
vote
2answers
3k views
Custom loops, sticky posts, and pagination nightmare
I've tried everything. I've looked at every. single. question. here, on StackOverflow, the WP help forum, googled 10 pages deep and literally tried EVERY combination of code I could find, for the ...
0
votes
1answer
120 views
Custom loop off by one post
Within my loop I want to display 9 posts that exclude categories X, Y, Z and all sticky posts.
Between post 3 and 5 I would like to place a sticky post with a custom template.
The below works ...
0
votes
2answers
1k views
Multiple loops with / without sticky posts and different post limits
I am having trouble with multiple loops and sticky posts in wordpress.
The first loop I just want all the sticky posts.
<?php query_posts(array('post__in'=>get_option('sticky_posts'), 'cat' ...
1
vote
2answers
594 views
Using categories & “stickyness” together
I've got a custom query on my homepage showing all posts in a certain category. I need this query to respect sticky posts, but it seems from my research that category queries ignore stickyness. My ...
0
votes
1answer
590 views
wordpress query_posts featured page always on top
I'm using the query_posts for "Page" item rather than "Post". I want to have the ability to make the "featured" page always on the top, we could add a custom field called "featured_product", if it's ...