The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
18 views

Querying Multiple Categories With Different Offsets

On my website I have a "Breaking News" section which shows the most recent 4 stories in the "Breaking News" Category. Under this I have a featured news section which displays 5 more stories from the ...
0
votes
2answers
38 views

Creating two loops based on different logic

I'm trying to figure out the best way to go about this and I have part of my solution, but I can't figure out all of it. My ultimate goal is within a certain page template, to show the newest post ...
0
votes
0answers
122 views

I'm using the offset parameter and dynamically loading posts via waypoints, how do I reset the offset?

I have posts that load when I hit the bottom of a container, lazy load, infinite scroll etc. using the jquery waypoint plugin. I have a button that dynamically loads the first 3 posts again, so I can ...
0
votes
3answers
78 views

Get post offset/posts page offset in single post page (outside the loop)

I would like to know how I could get the offset of a custom post or its page, outside the get_posts loop. I developed an external web application which connects to the wordpress blog with JSON API ...
1
vote
2answers
33 views

Exclude the first 'n' number of posts of a tag from home page?

Use case (example): Using a separate, custom query my website's home page shows 5 featured posts, tagged 'Highlights (highlights)', followed by the latest posts, from the main query. I don't want the ...
4
votes
1answer
237 views

Different 'posts_per_page' setting for first, and rest of the paginated pages?

How do you set the posts_per_page query setting so that a different number of posts are displayed on the first of the paginated pages (of home, archive, search, etc.) and the rest of them? For ...
0
votes
2answers
99 views

Get the index of post outside the loop

I'm trying to find out the index of the post which is currently viewed (single post page). I have an overview of the articles in the same category in a sidebar. But when a user navigates to a post ...
0
votes
1answer
195 views

offset WP_Query by negative 1

I have an event loop and I was wondering if it's possible to somehow offset the loop by -1 so the prev and next posts of the current post are shown. --edit-- Okay thanks for your comments, my ...
0
votes
2answers
398 views

How to adjust found_posts so that it accounts for offset and pagination

So far this is the code I have in my index.php file: <?php // Custom code to offset posts and setup pagination $page = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; ...
1
vote
2answers
546 views

Specific Loop For 2 <div> Within Each <li>

I need to create a loop that can logically be described as the following for a carousel: Requirements: 3 Loops 2 Posts Per Loop No Duplicates Order by Post Date Visual: < Start Loop #1 > ...
0
votes
1answer
79 views

Offset posts with random order

I'm trying to have five advertisement locations, each pulling posts from the same custom post type, but also loading randomly. The only problem I have with my code below is that it will sometimes ...
0
votes
1answer
256 views

wordpress category.php query for featured news item, broken pagination and repeating posts

I am having a few issues with a site I am building, on the news page It has 1 featured post from the news category and then under that more news category posts, but missing out the featured news item ...
0
votes
1answer
96 views

Calling two images at a time? A better way?

I'm having trouble wrapping my head around the best way to achieve this. I'm trying to load two photos at a time into a which serves as a slideshow wrapper. Currently i'm repeating a lot of code and ...
3
votes
2answers
290 views

Using Offset in Custom Post Type Query

I'm using the following query for a custom post type: <?php $posts = get_posts(array( 'numberposts' => -1, 'offset' => 20, ...
0
votes
1answer
233 views

Offset Loop by 1 , Limit next loop to 1 (Most Recent) Post

I have a loop that I would like to Offset by 1 so the most recent post is not displayed, and another loop where I only want 1 item which would be the most recent post. These are the loops I tried: ...
0
votes
1answer
203 views

How do I rewrite this loop as a new WP_Query style-loop?

How do I rewrite the if (have_posts()) : ... while (have_posts()) : the_post(); style Wordpress loop below as a new_query style-loop using <?php $the_query = new WP_Query();? ( As shown in ...
2
votes
2answers
330 views

Most commented / popular posts and offset

I am using this code to show 3 most popular posts based on number of comments : <?php $pop_posts = 3; $popularposts = "SELECT $wpdb->posts.ID, ...
0
votes
1answer
709 views

Custom query, works, but I get a “Notice: Undefined offset: 0…”

My custom query works, but in debugging mode I get this error: Notice: Undefined offset: 0 in /storage/content/24/150624/mydomain.com/public_html/wp/mysite/wp-includes/query.php on line 2232 This ...
0
votes
2answers
191 views

Keeping get_posts' offset and is_paged() synchronized

I am developing the blog-template of my theme, which works as following: The user can input the total post-count to display on each blog-page ($blogpost_count). The blog itself lists post-entries in ...
0
votes
2answers
457 views

Related Posts loop - offset

I've been working on this for many, many, many weeks already. I've already asked similar questions here and elsewhere, but nobody seems to be able to sovle this problem. Maybe it's not possible ...
0
votes
1answer
305 views

Offset for Loop

I want to have an offset of 4 posts for my related posts. I'm using Flowplayer's jQuery Tools Scrollable, so I want people to be able to scroll through the 4 latest posts, then the next 4 posts etc. ...
0
votes
1answer
315 views

Offset a post in the loop, with using PageNavi Plug-in

I am trying to offset 1 post in my main loop, I have tried a few things Like query_posts() etc etc, and i can get the offset to work but my pagination ends up not working , I am using the PagNavi ...
0
votes
1answer
172 views

Loop Offset for tag based “Related Posts”

As I'm using the jQuery Tool "Scrollable" for my Related Posts section (see example here), I was wondering how I can implement an offset so that in the first loop it'll show the first 4 posts, then ...
0
votes
1answer
200 views

How do I add a timezone offset to this query?

Problem is that $today is pulling GMT from the database; I need to offset GMT by -6 hours; Have been unable to find a query with an offset like that. <?php $paged = ( get_query_var('paged') ) ? ...
1
vote
1answer
1k views

WP_Query: offset ignored when posts_per_page is -1?

Is it only me or this is what's happening? I just want to get all posts starting from a certain offset, like 10. Instead I get all posts starting from the 0.
1
vote
1answer
223 views

Comments offset

I need to display comments starting from the second, omitting the first. With posts I did it using "offset" but I can't find anything similar for comments. Since I'm using threaded comments, must ...
0
votes
1answer
543 views

WP_Query - Adding “offset” posts to the end of the loop

I'm trying to create two queries. In the first query, I will, for example, display 6 posts, in a given order. In the second query, I want to display the same 6 posts, but "offset" the first 3 and ...
0
votes
1answer
864 views

Stomping WP_Query in author archive to facilitate pagination with custom queries

I am using get_posts and get_comments to build several loops on the page, at which I am having some issues in pagination. I have the global posts per page option (Settings > Reading) set to 10, and ...