StudioPress Community Forums

StudioPress Community Forums (http://www.studiopress.com/support/index.php)
-   General Discussion (http://www.studiopress.com/support/forumdisplay.php?f=7)
-   -   Featured Content - hard code category (http://www.studiopress.com/support/showthread.php?t=342)

matpacker 11-04-2008 08:32 PM

Featured Content - hard code category
 
Hi

Just wondering how I can hard code the category into the feature scroller?

The reason I would like to do this is that I'm using it with the Revolution Music theme as the old feature content breaks with a couple of plugins I need to use, ie. Events Calendar in particular, and the new scroll in Chrome doesn't break with that plugin.

Alternatively I need to add the Chrome options code in the functions.php to the Rev Music functions.php.

Anyone able to help?

Thanks in advance
Mat

Jason Schuller 11-04-2008 09:43 PM

Re: Featured Content - hard code category
 
To hard code the category, simply replace:

Code:

<?php if ($aOptions['featured-cat'] != '') { query_posts('cat=' . $aOptions['featured-cat'] . '&showposts=' . $aOptions['featured-count']); } ?>
With:

Code:

<?php query_posts('category_name=yourcategory&showposts=6'); ?>
Jason

matpacker 11-04-2008 09:56 PM

Re: Featured Content - hard code category
 
Thanks Jason. Worked a treat!

Jason Schuller 11-05-2008 11:01 AM

Re: Featured Content - hard code category
 
Glad to help... ;)

matpacker 11-07-2008 01:58 AM

Re: Featured Content - hard code category
 
And this is the site that it's in use on, http://www.imwiththeband.com/. It's still a bit of a work in progress, has been for the last 2 years I think..haha.

Jason Schuller 11-07-2008 10:28 AM

Re: Featured Content - hard code category
 
Looking good... By the way, you might want to edit "coda.slider.js" and move the arrow buttons to a location on your server.



All times are GMT -5. The time now is 01:19 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.