Comments (5)
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 );
from cornerstone.
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.
from cornerstone.
I guess we answered at the same time thewirelessguy! :)
Great. And this parts of code go into our functions.php file?
from cornerstone.
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 );
from cornerstone.
Thanks guys!
from cornerstone.
Related Issues (20)
- Removal of Orbit CPT HOT 4
- Deprecated: Function ereg() is deprecated in cornerstone/functions.php on line 191
- Load jQuery in <head> HOT 2
- Remove Orbit from Admin Menu [found it] HOT 2
- Title is not rendered correctly HOT 4
- Issues with Advanced Custom Fields plugin? HOT 3
- Issues with Advanced Custom Fields plugin?
- Dequeue parent theme's copy of Foundation HOT 12
- tiny issue HOT 1
- No sass files? HOT 2
- strange behavior of pagination in smartphone-size HOT 2
- Single page nav anchor links do not get active class HOT 1
- Missing Closing Div HOT 1
- Theme hooks. Do you use them? I'm considering removing them. Would welcome feedback.
- Admin Bar is missing? HOT 2
- Localisation support? HOT 2
- Orbit validation error HOT 1
- Feature Wish - Searchform in top-bar HOT 1
- Migration from Cornerstone Foundation 3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cornerstone.