nagooooyen
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: pagination not working for categories with wp 3.0Hi Tolga~
I have same problem.
It was partially fixed by changing the admin> settings> reading > ‘blog pages show at most’ setting to 1.If anyone has insight on the problem, I would love to learn a better solution.
Note: I have the default option selected as well and am using ‘posts_per_page’
I inputted this into my functions file (courtesy of Remiz)
//Pagination fix function remove_page_from_query_string($query_string) { if ($query_string['name'] == 'page' && isset($query_string['page'])) { unset($query_string['name']); // 'page' in the query_string looks like '/2', so i'm spliting it out list($delim, $page_index) = split('/', $query_string['page']); $query_string['paged'] = $page_index; } return $query_string; }
good luck.
Thanks for the info Bechster. It is useful when you want to show a specialized list of subcategories on your parent category page that includes description.
I am also combining it with the category image technique here:
<?php foreach((get_the_category()) as $category) { echo '<img src="https://example.com/images/' . $category->cat_ID . '.jpg" alt="' . $category->cat_name . '" />'; } ?>
to make my parent category more of an overview page.
Thanks a lot. love the wordpress community.
Forum: Fixing WordPress
In reply to: Exclude Posts Without Attachments From QueryThanks for posting all of this GhostPool & Kz.
I have been searching for this for a few days and I got it to work. So I figure I will recount my experience so that it may be searchable for others like me.I was trying to use the code at this link to attempt to exclude posts based on a similar set of requirements as GhostPool.
That did not work and was a bit bulky in retrospect. I then tried to build a filter that would alter the query in a similar manner as what is described above. That is: excluding posts based whether the image attachment was available and if not skipping it while maintaining the same number in my post count. It didn’t turn out too well…
I found this via a google search for ‘excluding posts without attachments’. This code works! Thank you!
If people are having trouble figuring out where the wpdb… is supposed to go (because it doesn’t look like the common if,while statements), here is a resource that helped me out a lot.
NOTE: for further control over the # of posts displayed add ‘ LIMIT #; ‘ after ‘ ORDER BY post_date DESC ‘
Cheers.
Forum: Fixing WordPress
In reply to: Lost Password, Link In Email Not Valid (key), ‘Fix’ Does Not WorkThank you so much. After countless frustrating attempts to reclaim my lost password this definitely worked.
Again, for those who are in the same boat:
https://www.village-idiot.org/archives/2007/05/22/wp-emergency-password-recovery/