Support » Plugin: OptionTree » Adding slides as default

  • Resolved nathanegraham


    I want to set two sliders as default for users when they install a theme (e.g., when a user installs the theme and goes to Theme Options–>Front Page Slider, they will already see two slider images with the option to add more or modify the default slides. This is for a course I’m teaching and I need to really guide my students with a lot of default values.

    I want users to see this in theme options when they go to front-page slider by default:


    How do I add default sliders with list-item?

    Here’s part of what I have so far and it’s not even close to working. Thanks in advance!

    ‘id’ => ‘homepage_slider’,
    ‘label’ => ‘Slider: Slide Manager’,
    ‘desc’ => ‘Upload images that you’d like used as slides on the default homepage layout, as well as a simple destination URL for when visitors click each slide.

    Note: The theme will automatically resize any oversized images to fit the space’,
    ‘std’ => ”,
    ‘type’ => ‘list-item’,
    ‘section’ => ‘skeleton_slider’,
    ‘class’ => ”,
    ‘choices’ => array(),
    ‘settings’ => array(
    ‘id’ => ‘slider_image’,
    ‘label’ => ‘image’,
    ‘desc’ => ”,
    ‘std’ => ‘’,
    ‘type’ => ‘upload’,
    ‘class’ => ”,
    ‘choices’ => array()
    ‘id’ => ‘slider_link’,
    ‘label’ => ‘Link to Post’,
    ‘desc’ => ‘Enter the posts url.’,
    ‘std’ => ‘’,
    ‘type’ => ‘text’,
    ‘class’ => ”,
    ‘choices’ => array()

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Derek Herman


    This would be the entire Theme Options file if you only had that one option.



    Thanks for your help! This almost worked. It definitely gives me default sliders in theme options, which looks like this

    Screen Shot 2012-11-15 at 12.07.23 PM

    but the sliders don’t actually display correctly on the front page of the theme. Perhaps this just isn’t possible.

    Here’s what results when I add the code you’ve linked:

    Screen Shot 2012-11-15 at 12.06.46 PM

    Here’s what it should look like:

    Screen Shot 2012-11-15 at 12.02.23 PM

    Thanks again for looking into this. Ideally when the theme is activated a slider image will appear in the theme by default. Since I’ve changed background images, added static images, text, etc., to appear as default through theme-options.php, it seems like I should be able to add the list-item slider for the front page by default. This would give users a default example of what to enter while also keeping a consistent look to the front page from semester to semester.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding slides as default’ is closed to new replies.