The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
369 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', ...
0
votes
2answers
125 views

Create thumbs only when a post is sticky or any other way?

I have a slider and I want to create thumb of specific sizes for my slider but only when the post post is sticky or if there is any other way so it won't create all these sizes I set for the slider ...
0
votes
2answers
213 views

How can I display only sticky posts from a parent category on the homepage?

On my homepage, I have 3 columns showing varying amounts of information from posts in specific categories (first 2 of them child categories, the third column displays posts from various child ...
-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 ...
-4
votes
2answers
2k views

How can I display sticky posts at first in wp_query?

I'm looking for a long time, but I could not find a solution. I'm not a coder. Please help me. Here is my wp_query code; $my_query = new WP_Query('category_name=animals&showposts=10'); while ...
2
votes
1answer
66 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 ...
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
798 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() ...
1
vote
1answer
147 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 ...
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' => ...
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 ...
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?
0
votes
1answer
205 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
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
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
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
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 ...
1
vote
0answers
495 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 ...
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 ...
0
votes
0answers
17 views

Pin a post to the top of a page, other than the home page

I'm using a static home page, so my posts go to a different page. How can I pin a post to the top of the page the posts go to (not the home page)? Originally I thought it was as easy as using the edit ...
0
votes
0answers
54 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
0answers
13 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
0answers
9 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
53 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
0answers
27 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 ...
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
0answers
150 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 ...
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 ) : ...