- This topic is empty.
January 1, 2012 at 6:47 pm #35918
I’m currently working on developing my site and have run into a few issues, mainly with the loop and wp_pagenavi plugin. Hopefully someone can help. I got the wp_pagenavi to work on the main page.
Here are my issues:
– Added wp_pagenavi to the Search and Archives page and it does not work. When ever I click on a page it just keeps the same data as the first page.
– The other issue, when I click on a category instead of listing all the posts in that category it displays the archives page.
– When I publish multiple posts on the same date, the date only appears on one post and not all of them.
A link to the site is: gelias.ca/test
Your help is again greatly appreciated.January 1, 2012 at 8:14 pm #93822TheDocMember
For the date problem, instead of using the_date() use this:January 1, 2012 at 8:15 pm #93823TheDocMember
For the category problem, do you have a category.php file? If not, create one.
As for the search and archives pages, can you post the loop that you have? It sounds like you are using query_posts and haven’t set it up properly for paging. http://scribu.net/wordpress/wp-pagenavi/right-way-to-use-query_posts.htmlJanuary 1, 2012 at 10:25 pm #93831
Thanks. The date worked. The category no I do not have one, will create one and see how that goes.
As for the search, I have tried everything but reverted back to start before adding wp_pagenavi. Here is the code:
Search Results for ">"" post_count; _e(''); echo $count; wp_reset_query(); ?> Results Found
No posts found. Try a different search?
Here is the code for the archives:
$arc_year = get_the_time('Y');
$arc_month = get_the_time('m');
$posts = query_posts( "year=$arc_year&monthnum=$arc_month" );
$count = count($posts);
Archive Results for ">"" Results Found
Please note that I am new to wordpress, so if there is a better way to do what I am doing please let me know.
Thanks again.January 1, 2012 at 10:59 pm #93834January 4, 2012 at 8:58 pm #94012
- The forum ‘Back End’ is closed to new topics and replies.