tomstirling1979 Posted September 10, 2010 Share Posted September 10, 2010 I have taken over a wordpress site that a web developer set up and he is no longer working with me so I cant get his help with it, I have a custom front page that has been pulling press releases that where posted previously and categorized as "press" I was asked to add a blog which I did by categorizing the post as "blog" In a nutshell, I now need the front page code to pull a mixture of both the "press" and "blog" each category has a numerical id so blog is 7 and press is 3 This is the current code that is in the page <?php query_posts('category_name=press&showposts=10&offset=0'); ?> I looked up wordpress support for this, and found this query_posts(array('category__in' => array(2,6))); How can I integrate this if possible with the top line so it pulls the newest posts from both categories? Any suggestions could REALLY help me out! Thanks! Link to comment https://forums.phpfreaks.com/topic/213065-help-time-sensitive/ Share on other sites More sharing options...
tomstirling1979 Posted September 10, 2010 Author Share Posted September 10, 2010 Do I need to give more information, I am a total newbie to php this "complex" - The only thing I use it for on a regular basis is include/require files and thats straight forward, I feel I just dont have the synthax down here for this to work the way I need it to. And again, any help at all would be really appreciated. Sorry for being impatient, but as I said its a time sensitive issue and help sooner than later can make all the difference. i normally wouldn't try and bump my post up....... Link to comment https://forums.phpfreaks.com/topic/213065-help-time-sensitive/#findComment-1109640 Share on other sites More sharing options...
tomstirling1979 Posted September 10, 2010 Author Share Posted September 10, 2010 Ok, this ALMOST did exactly what I wanted it to do.... <?php query_posts(array('category__and&showposts=10&offset=0' => array(3,7))); ?> The feed did show a mix of the 2 categories, BUT! - it didn't show any more than the most recent and the next one, thr part where I have it saying showposts=10 didnt seem to register. Any ideas? :'( Link to comment https://forums.phpfreaks.com/topic/213065-help-time-sensitive/#findComment-1109706 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.