-2
votes
1answer
66 views

How to add wordpress pagination [closed]

i must use pagination. Where can i found good tutorial? $wpdb->get_results("SELECT * FROM wp_ogloszenia_kupione WHERE klient_id = $current_user->ID");
0
votes
2answers
430 views

How does offset works on pagination? (get_results)

I followed this link and created my own custom query with pagination, But I don't really understand how the offset work. This pagination does not work well, and I'm getting zero value for offset: ...
0
votes
0answers
95 views

get_query_var('paged') giving same result

I have a custom page, in that page i am using a custom select query for my search functionality. The problem is pagination not working. I used $on_page= get_query_var('paged'); for pagination. When ...
0
votes
1answer
431 views

Custom query (author is post_author or meta co_author) with Pagenavi pagination

I need to create a custom query for the author archive (where the author is post_author OR is a meta co_author), and it have to work with WP Pagenavi. The query is something like this (omitting $wpdb ...
2
votes
1answer
3k views

WordPress Paginate $wpdb->get_results

Due to a complex multisite config, I have a query which combines the posts from two blogs and I would like to paginate the results. I am grateful for any help. I have posted my query. ...
4
votes
1answer
306 views

Query causing load because of SQL_CALC_FOUND_ROWS post counting?

I found this query causing some load in the server, my hosting provdier asked me to look on it. SELECT SQL_CALC_FOUND_ROWS wp_posts I think this select no. rows found in wp_posts table.. but i ...
0
votes
1answer
411 views

paginate_links on custom query in admin - 'sufficient permissions' error

I have created a page in my admin with this custom query: $rows = $wpdb->get_results("SELECT * FROM ej_feedback ORDER BY createdtime ASC"); I have made it successfully paginate as required in ...
2
votes
3answers
5k views

Pagination with custom SQL query

I have my own SQL string to select Custom Post Type posts with specific WHERE clause. I've used the offset and limit to return appropriate posts depending on a page being displayed. That's working ...