[resolved] Adding slides as default (3 posts)

  1. nathanegraham
    Posted 3 years ago #

    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' => 'http://stat-ass3.ses.com/12230313/banner-blog-spreadingIdeas.jpg',
    'type' => 'upload',
    'class' => '',
    'choices' => array()
    'id' => 'slider_link',
    'label' => 'Link to Post',
    'desc' => 'Enter the posts url.',
    'std' => 'http://digitalborn.org',
    'type' => 'text',
    'class' => '',
    'choices' => array()


  2. Derek Herman
    Plugin Author

    Posted 3 years ago #

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


  3. nathanegraham
    Posted 3 years ago #

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


    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:


    Here's what it should look like:


    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.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • OptionTree
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic