• Resolved nathanegraham

    (@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:

    list-item

    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!

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

    http://wordpress.org/extend/plugins/option-tree/

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

    (@valendesigns)

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

    https://gist.github.com/4a2f47727f1e034114a9

    Thread Starter nathanegraham

    (@nathanegraham)

    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.

    Thanks!
    NG

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