Simplefolio Customization: Seperate Slider and Portfolio Category Settings

Posted February 20th, 2011 in Public and tagged , by Nick Cron

By default Simplefolio assumes you want to use the same post category for the elements displayed on the homepage slider and the portfolio page.  These modifications allow you to select a different category for each section.

Step 1 is to add the option in the template configuration file located at /<root>/wp-content/themes/simplefolio/admin/index.php

Around line 248 find this block:


$sfoptions[] = array(    "name" => "Slider Options",
"type" => "heading");
$sfoptions[] = array(    "name" => "Number of Slides",
"desc" => "This must be a number. The slides will be taken from the portfolio category you selected in earlier options. Default is 5",
"id" => $shortname."_slider_slides",
"std" => "",
"type" => "text");
$sfoptions[] = array(    "name" => "Text Lenth",
"desc" => "The ammount of characters you wish to display under the title. Default is 100",
"id" => $shortname."_slider_chars",
"std" => "",
"type" => "text");

Add the following:


$sfoptions[] = array(    "name" => "Slider Category",
"desc" => "Select the category you will use for slider elements.",
"id" => $shortname."_slider_page",
"std" => "Select a page:",
"type" => "select",
"options" => $sf_categories);

The settings page should now look like this:

Step 2 is to modify the “template-home.php” file located at /<root>/wp-content/themes/simplefolio/admin to reference this new option

Line 14 change the following:

From:


$category = get_option('sf_portfolio_category');

To:


$category = get_option('sf_slider_page');

Share this Post

  • http://twitter.com/davidmasters David Masters

    Thank you for this – it’s very helpful.  I noticed the images in your slider link to pages on your website rather than to “Slider” category posts.  How do you do this?

    Thanks!

    David

  • Anonymous

    David – I have another post on that here:  http://www.njcmedia.com/2011/02/simplefolio-customization-use-custom-field-to-control-homepage-slider-links/

  • http://www.facebook.com/tallandi Andrea Parrish Geyer

    Thanks so much! Worked wonderfully well.

blog comments powered by Disqus