thewirelessguy / cornerstone

Cornerstone is a WordPress starter theme based on the Zurb Foundation Responsive Framework. Cornerstone aims to provide a lightweight starter theme that is responsive and SEO friendly that web designers can build great looking websites on.
GNU General Public License v2.0
154 stars 40 forks source link

Adjust Orbit settings? #19

Closed ghost closed 10 years ago

ghost commented 10 years ago

I tried the usual script functions in the footer of the theme to hide the navigation arrows and a few of the other Orbit settings as explained in the Foundation Docs, but they don't seem to be working with the setup of the theme. http://foundation.zurb.com/docs/components/orbit.html

Perhaps I'm doing something obviously simple, but I would appreciate any help!

alana-mullen commented 10 years ago

At some point I'll add this info to a wiki page. I recently added optional parameters, eg

<?php OrbitSlider("navigation_arrows: false; slide_number: false; bullets: false"); ?>

This would output:

<ul data-orbit data-options="navigation_arrows: false; slide_number: false; bullets: false">

This is easier and less problematic than changing the initialization JavaScript in the footer. Each parameter is separated with a semicolon.

You can also set an optional image size so the height/width are consistent across all the Featured Images used. If you don't set this parameter then the default is the full unmodified image resolution.

<?php OrbitSlider("navigation_arrows: false; slide_number: false; bullets: false","large"); ?>

or

<?php OrbitSlider("navigation_arrows: false; slide_number: false; bullets: false","orbit"); ?>

where 'orbit' (or whatever name you choose) is defined in your child functions.php with something like

add_image_size( 'orbit', 1000, 400, true );
carambamoreno commented 10 years ago

I played with the orbit section on the backend of wordpress without finding a way to modify the options.

Is this on development, or is it ready to use? I was able to create a slider, but gave up trying to modify the options.

I ended up creating a new template for orbit slider with the slider options added via data-attributes, like it says in the documentaion. After that, i applied the template to my page.

carambamoreno commented 10 years ago

I guess we answered at the same time thewirelessguy! :)

Great. And this parts of code go into our functions.php file?

alana-mullen commented 10 years ago

The following goes into the page/post template that you want to add it to. Personally I usually copy and paste the code from orbit.php (in page-templates folder) into a custom template eg frontpage.php and then make changes as needed.

<?php OrbitSlider("navigation_arrows: false; slide_number: false; bullets: false","orbit"); ?>

The following goes in the functions.php of your child theme

add_image_size( 'orbit', 1000, 400, true );
ghost commented 10 years ago

Thanks guys!