![]() |
Wordpress Questions
Hello,
These have been bugging me for a while and I've not been able to find a solution to nether: 1) Display the total number of wordpress posts, minus a category. So all posts within all category's apart from 1. 2) Display a set number of random posts on a single page. I know these can most likely be done using a plugin but the way i want to use them isn't worth having a plugin for. Can anyone help? :-/ |
Hello Dan. :-) First off, welcome to talkPHP ;-)
From my brief experience with Wordpress, I know that there are a LOT of plugins available. Even on these nagging points. #1. I've annoyed myself from time to time with that one as well, but I never figured out where I could change or somehow edit the code. There might be something on their site about the maximum post count. #2. Try the random post plugin. If I remember correctly, that's what it's called. Else you can of course retrieve the array of posts and then randomly display one each time the page refreshes. If you look closely, Wildhoney (talkPHP meister) did the same thing with some random tips on PHP as well. I hope my post satisfies you. If not, you can wait till some Wordpress guru replied here. To my knowledge, nobody here uses Wordpress but somehow I figure that Alan @ CIT en Rendair have used it in the past. They simply strike me as Wordpress users. :-) Don't ask why tho. Good luck and I hope to see you around the forum some more. ;-) Enjoy your stay. |
Placeholder for my post. (I'll reply with solution).
|
Still trying to display random posts in wordpress, I have this working with the follwing:
Code:
<?php global $wpdb; $numposts = 40;Any suggestions? |
Quote:
PHP Code:
|
| All times are GMT. The time now is 03:16 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0