Linked Questions

1
vote
2answers
830 views

WP_Query or get_posts?

When using the 'fields' => 'ids' parameter, is it better to create a new WP_Query in the code below rather than doing get_posts? How would the loop look if I used WP_Query? function ...
2
votes
3answers
1k views

Adding “latest from the blog” to the homepage

I have a big problem and no clue how to solve it :) I want to add a "module" to my homepage (static homepage, not blog posts) that will display the 2 latest blog posts in a very particular way and ...
1
vote
1answer
994 views

Wordpress Pagination Not Working - Always Showing First Pages Content

I am working on a website where I have a blog but I also have a custom post type to allow me to drop in some videos. I would like to use pagination so that if there are more then 9 videos displayed, ...
2
votes
3answers
453 views

Exclude category on blog list page

I've got a site with a News page (archive for category 'news') and a separate Blog page. When I make a post for the News page I select the category 'news'. So, on the news page you only see the posts ...
0
votes
2answers
2k views

Blog Page pagination not working, loads Page 1 each time [duplicate]

I don't know what to do here but pagination is driving me crazy! As you can see, "Older" points to blog/page/2 but when clicked, the site stays on blog/. I'm using wp-pagenavi for pagination. The ...
0
votes
2answers
1k views

Custom posts per page does not work with pagination

I have one page in my template where I would like to set a custom posts_per_page. Here is the code I have used: <?php global $query_string; query_posts($query_string . '&posts_per_page=4'); ...
0
votes
3answers
517 views

Using next/previous_posts_link with customised search

I have a few different searches on my website: "Species profiles" (custom post type search) "Glossary" (custom post type search) Generic, site-wide search Currently I'm using search.php; ...
0
votes
2answers
1k views

Display posts separated by Category in Author's page

I created an author's page using: <?php if(isset($_GET['author_name'])) : $curauth = get_userdatabylogin($author_name); else : $curauth = get_userdata(intval($author)); endif; ?> ...
1
vote
2answers
480 views

Query to return maximum of one post per author

We are introducing a "featured author" area on our site and would like to display the most recent articles by a select group of authors. However, we only want a maximum of one post per author to ...
0
votes
1answer
512 views

WordPress custom post type category pagination 404 Error

This problem is giving me a headache and I was wondering if anyone knew how to fix it. I have a custom post type called Review. Here is how it is defined: function codex_custom_init() { $args ...
2
votes
3answers
394 views

What are the differences between “Latest Posts” and “Static Page”?

WordPress has an option to pick "Latest Posts" and "Static Page" under "Settings" in Admin Panel. My questions: What page template is getting loaded in each of those modes? Why paged stops working ...
0
votes
4answers
985 views

Trying to display posts by authors in with specific user meta

Ok here's the solution: <?php $wp_user_search1 = new WP_User_Query( array( 'meta_key' => 'state' , 'meta_value' => 'NM', )); $listers1 = $wp_user_search1->get_results(); $lister_ids1 = ...
0
votes
1answer
463 views

Pagination not working in category listing [duplicate]

I can't get pagination inside categories listings to work. I'm using a custom query, with the get_query_var('paged'): $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args=array( ...
0
votes
2answers
963 views

Achieving pagination with `query_posts`

I'm using query_posts to build a list of posts from a single category, and I'm trying to add pagination to this setup. Here's my code: <ul> <h1><?php the_title(); ?></h1> ...
1
vote
2answers
125 views

Why is the first query affecting the second query, even after wp_reset_query() and wp_reset_postdata(), but not on the second page?

I am literally clueless as to why the code does not function properly on the first page, but functions as expected on the second page. I have already tried running the second query via another ...

15 30 50 per page