The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
91 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); ...
0
votes
0answers
364 views

Showing sticky posts with get_posts()

I'm using this to retrieve posts on my index page: <?php $posts = get_posts( "category=13&numberposts=2" ); ?> <?php if( $posts ) : ?> <?php foreach( $posts as $post ) : ...
2
votes
1answer
1k views

Adding Sticky functionality to Custom Post Type Archives

In WordPress, Custom Post Types do not have Sticky functionality as a core feature. It is possible, I'm sure, to create it in certain cases—and I'm working on a project that requires it for ...
1
vote
1answer
2k 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 ...
0
votes
1answer
56 views

Why: sticky front page code, shows latest non-sticky on logged-in front page

I have this code to display only the latest sticky post on the front page. the strange thing is that, when I'm logged-in it shows non-sticky latest post, even if it's private... <?php ...
1
vote
1answer
90 views

Keep sticky posts out of query unless they have featured image

I have a query running which prevents posts without various criteria from appearing, one of these is the necessity to have a featured image. Sticky posts however seem to end up in the query ...
0
votes
1answer
651 views

wp_query should show stickies first

I have the problem that my theme is for some reason always showing the latest posts at first. I would however like it to show all stickies at first and then show the regular ones. Here is the code: ...
12
votes
2answers
2k views

Sticky Posts exceed posts per page limit

I'm using pre_get_posts to adjust the number of posts displayed on my homepage. function lifelounge_query_adjust( $query ) { if ( is_home() ) { set_query_var( 'posts_per_page', 12 ); ...
-1
votes
1answer
216 views

Sticky post for all pages and categories

I want to have a sticky post for all my pages and categories. The choice of "sticky post" in the edit post, didn't work. I found many pieces of code but I haven't the result that I want. I prefer to ...
1
vote
2answers
667 views

Exclude sticky post from main query?

I am having alot of trouble with this. I was using <?php query_posts( array( 'post__not_in' => get_option( 'sticky_posts' ), 'paged' => get_query_var( 'paged' ) ) ); ?> to exclude the ...
0
votes
1answer
429 views

WooThemes Mini Features - modify query_posts to display only sticky_posts

/* Mini-Features */ ?> <div id="sub-featured" class="<?php echo $main_css_class; ?> section"> <h2 class="section-title"><?php echo stripslashes( ...
1
vote
3answers
2k views

wp_query for the first sticky, then display the rest of the posts excluding the first sticky

I've been reading this by @nacin and getting to grips with wp_query over query_posts that I used to use. What I want is: to put this in a template file to query all posts of this category, in this ...
1
vote
1answer
148 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
361 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
183 views

How to change text (date) in post base on the day

So the question seem unclear, i rewrite it to hope for the best and get some great ideas. I write a WordPress Sticky post (always first on top). In that post text there is something written like : ...
1
vote
0answers
86 views

Difficulty with PHP function that displays a post's format in WordPress

I am working on a WordPress theme using Bones. I would like to be able to show some text just above the title of each post if the post is either featured, password protected or private. So far I came ...
-1
votes
2answers
392 views

First post outside of loop, homepage only?

Because of the way my templates are structured, I need to pull the first/sticky post from the site outside of the standard loop, just on the homepage. I'm using _s (underscores.me) as a base, so the ...
0
votes
1answer
2k views

how to make custom posts sticky? [duplicate]

Possible Duplicate: Wordpress 3.1 - How does one add sticky post capabilities to post types What I had was normal posts...until I realized that custom posts are what I should use for my ...
1
vote
2answers
521 views

sticky post in custom loop

I have a problem with showing sticky posts in a custom loop. This is the code I'm using to for the custom loop: <?php $post_from_cat_a = new WP_Query(array( 'category_name' => ...
6
votes
3answers
707 views

How to add “Stick this post to the front page” to front end?

I have a baseball related website with multiple authors. I use the "Stick this post to the front page" to denote an "Editor's Pick" on an article. I would like to add a link/button to allow editor to ...
0
votes
1answer
220 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' => ...
4
votes
1answer
347 views

Code to make a post sticky

How is it possible to upgrade a post to make it sticky directly from code, not by admin area? Is it possible through a code like: update_post_meta($post_id, $meta_key, $meta_value, $prev_value); In ...
5
votes
1answer
573 views

Show all sticky posts, WITH pagination

Trying to get a custom admin link working for a custom post type. I've managed to add a link to show all "sticky" posts next to the usual "All", "Published", "Trash", etc., but the actual query isn't ...
0
votes
3answers
126 views

How to automate featured posts number? [duplicate]

Possible Duplicate: featuring old articles without messing up with the archive Let's say you have a category called "featured". and you use that to feature posts. And the theme you have has ...
1
vote
1answer
281 views

How to stick custom post at the top in search results

I'm trying to stick a post in the search results for the value and meta_key meta_value. If the search results in the post is meta_key - sticky and meta_value - fatured, the display on top of these ...
0
votes
2answers
307 views

I would like to change the sticky posts label “Featured” to something else

On the posts that we label "sticky" the word "featured" appears. How can I change that to "new"? David
0
votes
2answers
439 views

Make posts_per_page value the same on all pages

I'm almost finished with this one, just a small problem left. Hope you can help me. I've got two very simple, custom loops. One for sticky posts, and one for non-sticky. I've manage to get the sticky ...
0
votes
1answer
996 views

Multiple loops on index page with sticky post and pagination

First post on this site. Hope to get some help from you guys. Probably a simple answer for you experts. I have two category's (news & work). I want to show on my index page (wordpress ...
0
votes
1answer
154 views

marking a post that was sticky on category template

i want some how to mark the post that has been featured (was a sticky post) in the category template. in wordpress logic it should be something like - was_sticky(); anybody?
4
votes
2answers
4k views

How to make my front page display only the most recent sticky post, plus usual widgets?

WP 3.3.1, Suffusion 4.0.2 I am trying to figure out how to make my front page display only the most recent post marked sticky. I can't find how to do this in the documentation. What I'm trying to ...
1
vote
1answer
653 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
2answers
1k views

Custom query: how to get the sticky posts first?

I noticed that if I code a custom WP_Query, sticky posts don't show first in the list. So I was wandering how to achieve that. I've almost done it with 3 subsequent queries, but I guess there must be ...
0
votes
1answer
176 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 ...
0
votes
1answer
93 views

Category sticky latest

I've been trying to write a script that shows the latest (single) post (in a particular category), however, if the user has chosen to have a post be sticky then the sticky post shows. When the sticky ...
1
vote
2answers
4k 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 ...
1
vote
1answer
74 views

How to get 1 or 2 specific posts on top of my wordpress blog?

Does anyone know how to get 1 or 2 specific posts on top of my wordpress blog all the time? I mean just like in a forum where you can sticky a post so they are always on top of the other posts. Is ...
0
votes
1answer
686 views

How to make sticky posts for category pages

how do I make certain posts to stay at the top for each category page. That is I want sticky posts for category pages. Thanks
4
votes
0answers
608 views

Sticky Posts & Posts Per Page [closed]

I notice that sticky posts will disregard the posts_per_page param? Like I have a query like $q = new WP_Query(array( 'posts_per_page' => 4, ... )); If there are 3 sticky posts, I will get 6 ...
0
votes
1answer
830 views

How to retrieve sticky post in raw sql?

How I could made a sql query who retrieve all the sticky post in a wordpress database? This is because we use a new app over the old wordpress website database, and I don't know where Wordpress ...
0
votes
1answer
161 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 ...
1
vote
3answers
2k views

ignore_sticky_posts in WordPress 3.0.3?

I am using WP 3.0.3 and I would like to exclude sticky posts from my query: This doesn't seem to work: <?php query_posts( 'posts_per_page=9&cat=-1,-2&ignore_sticky_posts=1' );?> To ...
0
votes
2answers
547 views

How to display sticky post with custom html

I'd like to display 9 posts and be able to insert a sticky post with its custom html template in between 4th & 5th post. Currently the sticky post gets displayed in both the "sticky container" and ...
2
votes
2answers
772 views

Display all custom post type posts and order them by an optional meta_key

I have a custom post type (CPT) called property. I have registered a featured property metaboxfor it as explained in this question "How do I create a featured post within a custom post type?". So a ...
4
votes
2answers
2k views

Show Sticky Posts in Category Archive

I'd like to be able to show sticky posts at the top of category pages. I'm using archive.php for my category page. I'm using the code below to display sticky posts at the top of my category archive ...
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' ...
2
votes
2answers
2k views

Sticky post for each category on category pages

I think the title is self explanitory. I would like to show category.php a post I set as sticky post for that category. Do you know a good plugin or a code to do this? Thanks, Sarit
2
votes
1answer
889 views

Exclude Sticky posts from Main Query break Pagination

I have a small problem with this function ! I would like to exclude all sticky post from my query but when I do it, it breaks my pagination. In the following code, when I remove the "'post__not_in' => ...
0
votes
2answers
1k views

How to retrieve “sticky” post outside the “loop”?

I need to display the "sticky" post in a section that is outside the "loop". Can someone tell me how to do this?
2
votes
2answers
3k views

Wordpress 3.1 - How does one add sticky post capabilities to post types

In wordpress 3.1 they finally added the option of allowing posts belonging to a custom post type to be marked as "sticky"... what I can't figure out though is how to enable this so the admin menu ...
2
votes
2answers
847 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 ...