The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
38 views

Manage sticky post content via the admin panel

I'm working on a theme that I try to make from scratch. Now I want to have two sticky post in my theme which uses for ads purpose. So I want the site owner to have the ability to change the sticky ...
0
votes
1answer
18 views

Trying to Exclude Sticky Posts From date_query

<?php $lastThirty = date('Y-m-d', strtotime('today - 30 days')); $currentMonth = date('M Y'); $t = date('d-m-Y'); $today = date("D",strtotime($t)); $lastThirty = array( 'date_query' => ...
1
vote
2answers
366 views

Sticky post appears twice

I am trying to modify the number of posts_per_page in the loop. This way: function posts_per_page($query) { $query->query_vars['posts_per_page'] = 3; } add_filter('pre_get_posts', ...
1
vote
1answer
797 views

How can I make a custom post type sticky?

I installed the "Sticky Custom Post Types" plugin, and I added this code to my function.php: function wpb_cpt_sticky_at_top( $posts ) { // apply it on the archives only if ( is_main_query() ...
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 ); ...
0
votes
0answers
11 views

How to get sticky-posts on front-page working with category query

Im using the front-page.php to display some static content as well as my 5 latest posts in the category "Forsiden" (Frontpage). But the "sticky" post option, is ignored when categorising the posts on ...
0
votes
1answer
29 views

Add something after all sticky posts in The Loop

Let's say I've got some posts and some of them are sticky. The sticky posts are displayed at the very top in The Loop. while( have_posts() ) { the_post(); get_template_part(); } How can I add ...
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 ...
0
votes
1answer
24 views

Show sticky blog post on homepage

Is there a bit of PHP I can use to grab the sticky blog post (there will only ever be one) to drop into my homepage template file?
1
vote
1answer
77 views

How to make post sticky in the admin page?

i work with restaurant plugin that use custom post type. the question is, if it possible to select some post and make him sticky (always be in the top) in the admin? i need this because when you add ...
2
votes
1answer
64 views

Include sticky posts in 'Blog pages show at most' X number of posts?

I'm using the default Loop Code. I've set the 'Blog pages show at most' option in Settings > Reading to 11. In my home page -set to show Latest Posts- whenever I mark a post as 'Sticky' it's being ...
0
votes
0answers
8 views

Blog Displays Only Sticky Posts

I set my home page to show the latest three sticky posts from the blog. The problem is, if you publish a post that's not sticky, it doesn't show up in the blog page. How could I fix it? The code ...
0
votes
0answers
52 views

Show sticky post before other WP_Query

$recent_posts = new WP_Query( array('posts_per_page' => $blog_num_posts, 'paged' => $paged, 'post_type' => 'post', 'post_status' ...
0
votes
0answers
21 views

Let user feature a specific post on the front page

I am making a WordPress template with a static front page. I want to feature a single post on the "About" section of this front page. This will be a preview with a featured image and a link to a full ...
0
votes
1answer
202 views

Only display sticky post or latest post in custom loop

I'm new to Wordpress and PHP and I've been battling with this for a while now. What I have for the moment is 2 loops. I want to first loop to only ever show 1 post: either a sticky post, or the ...
0
votes
1answer
52 views

Where is the sticky post option?

So I finally need to include sticky posts in a theme but it looks like the feature is gone. When I create a new post, and click "visiblity", the sticky option is missing. I checked a couple other ...
0
votes
0answers
26 views

Sticky Custom Post Types - Query returns nothing if no post marked as sticky

I am having an issue with sticky posts and custom post types. I want to display a sticky custom post type, but if there are no sticky posts, I simply want to display the latest post in that custom ...
1
vote
2answers
520 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' => ...
0
votes
1answer
146 views

Set custom field value when reaching expiration date

I had the idea to make sticky posts expire after a certain period of time. FYI, I am using a custom post type along with custom field suite and created sticky posts by creating a boolean custom ...
0
votes
0answers
40 views

global wp_query returning wrong post vars

I am currently filtering the_posts to recreate wordPress' "sticky post" function for custom post types. I also have to make sure that the sticky post is attached to a certain taxonomy term that ...
0
votes
1answer
42 views

Display image for first sticky post only

Working on news paper site here i am using sticky.I want display first 6 sticky post its displaying very good but problem is that every sticky showing there post image(feature image) here i just want ...
0
votes
1answer
32 views

Issue with first top post display order

Here i am trying to display top 6 post recent added post.But the problem is that first top post not displaying code is displaying top 6 post from top 2nd post except the top 1st post. Bellow is ...
0
votes
1answer
186 views

ignore_sticky_posts not working with word press version 3.9.1

I am trying to display a sticky post by its category id. The sticky post is displayed, but the problem is that the published sticky post is displayed twice. You can see from the snap shot below that ...
1
vote
2answers
938 views

Front page should display only one category of posts including sticky post with custom featured post box

I need code to get one category - including its sticky post and a custom featured post box on my front page. I am using twenty twelve. I have created a child theme. I have wordpress 3.6 on a ...
0
votes
2answers
68 views

Exclude Current and Sticky Post

On a single Post page I have a side bar displaying up to three other, related posts. How can I exclude both Sticky Posts and the Current post? I know how to exclude the Current post and how to ...
0
votes
1answer
57 views

Insert/sticky multiple posts in multiple positions

I'm attempting to do this but with multiple posts and specific positions. The post positions are hard coded right now, but will be pulled in from post meta. This code is only being ran on the homepage ...
0
votes
0answers
149 views

Limit Number of Sticky Posts to Show

I'm using sticky posts as features posts on home page. I'd like to limit the number of sticky posts to show two the latest two. I found this code, but it makes only on latest sticky post to show. I'd ...
1
vote
2answers
663 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 ...
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 ...
1
vote
0answers
491 views

How to use custom fields to enable sticky posts on custom post types?

Background: The Wordpress Answers site has two questions which ask about how to enable sticky posts on custom post types (see how to make custom posts sticky? and Enable sticky posts to custom ...
0
votes
1answer
79 views

get_option('sticky_posts') returns stickies that are in trash

The value of get_option('sticky_posts') includes those that are in the trash. How can I get a value minus stickies that are in the trash? var $stickies = count(get_option('sticky_posts'));
0
votes
1answer
79 views

Jquery and Sticky

I have a trouble with jquery and sticky in a div in my website. I have included jQuery core in my page, inside the tag "head": <script ...
0
votes
4answers
496 views

How to get bbpress sticky topics

I want to get bbpress sticky topics using query like this: $sticky = get_option('sticky_posts'); rsort( $sticky ); $sticky = array_slice( $sticky, 0, 2); query_posts( array( ...
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 ...
1
vote
1answer
101 views

Move sticky posts down in main loop

Currently I am working for a site which runs on WordPress, and using twenty thirteen theme which already has a sticky post function built in and working reasonably well. But I do not like how a ...
1
vote
2answers
2k views

Excluding Sticky Posts from The Loop and from WP_Query() in WordPress?

The following snippet is from a sidebar widget that lists "recent posts". Since its on the home page and I feature my lastest sticky post prominently on that page, I want to skip over the sticky in ...
0
votes
3answers
69 views

Get sticky post from category?

I have parent category is Game cat_id=42. Child categories are : acrade, causual,.... I want show a top game module in mainpage template, it will show 10 sticky post from game category. This my code ...
0
votes
2answers
74 views

I do not want my front page sticky post to show up in a category

I have a welcome paragraph on me front page. I did this using sticky post. But the welcome to my website sticky post also shows in my category? Is there a way to have it show on the front page ...
0
votes
1answer
45 views

Randomly placed sticky custom posts complemented by blog posts

On my index.php file I am showing the most recent posts using the standard index.php file. However, I'd like to include a custom post type (named products) in this standard loop. Have about 6 products ...
0
votes
1answer
889 views

Sticky Posts Not Sticking to Top of Category Archive

I'm using my index.php to display post archive pages rather than a specific archive.php file. This works fine, however sticky posts do not stick to the top of it. They do however, stick to the top of ...
2
votes
1answer
135 views

Display only the most recent sticky post, display other posts in chronological order

I want to display only the most recent sticky post at the top of the TwentyEleven page, and display the rest of the posts in chronological order, no matter whether they are sticky or not. I tried to ...
1
vote
1answer
228 views

How to display only feautured/sticky listings on the homepage

I want on my homepage on my first page to be displayed only featured listings no matter how old they are This is my homepage code: <?php get_header(); ?> <?php ...
4
votes
1answer
700 views

How do I show sticky posts on a static front page that also contains content?

In my theme, I'm using front-page.php for the static front page. I'm also using a page to store the content on the static front page. The front-page.php file is set up to show the content from that ...
0
votes
1answer
129 views

How to make all posts in a category “unsticky”?

The other day I posted this question. Now I'm wondering how I can do the same thing except this time instead of making unsticky posts sticky the code should make the ones that already are marked as ...
0
votes
1answer
66 views

How to make all posts in a category sticky?

Total WP and web development noob here. As the title suggests, I'm trying to make all the posts in one of my categories into "stickied" posts. But so far I've had no luck. What I've tried is this ...
0
votes
1answer
169 views

Exclude sticky posts from query

I used orderby=date and orderby=comment_count to show my recent post and popular post, but sticky post is always there on the top. How can exclude sticky posts?
0
votes
1answer
88 views

Display latest sticky post or display nothing

On my Blog http://flattrendz.com/, I currently want to display the latest sticky post. I used the code of http://justintadlock.com/archives/2009/03/28/get-the-latest-sticky-posts-in-wordpress ...
0
votes
3answers
189 views

Filtering all posts AND sticky posts through meta_query

I have a filter that filters posts from the main loop depending on a user role (handled externally) The meta data is entered when adding a post/page. This is the filter - it works for filtering ...
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 ...
-4
votes
1answer
674 views

Display All Sticky Post Before Regular Post

I would like to display all of my sticky post and then regular post thereafter. I am new to WordPress and not sure how to do this. Any help would be greatly appreciated. --------- ...