November 4, 2013 at 11:42 pm #12821
The Jump Start base starts with just two tabs in the theme options editor – layout and content.
I have used other Theme Blvd. themes that also have more tabs like configuration and social media.
It looks like the options API is fairly complicated. Do you have any child themes that might have some of these options? Or can I import some of these options from another theme?
Thanks for any help. I would like to be able to set the background, do some basic font tweaking in the interface.
November 5, 2013 at 12:39 am #12826
I would start with some of the code snippets in the options API and just play with them. It really isn’t all that difficult once you get into it and you’re not just looking at a blank document.
The example here is a good snippet that sort of puts it all the concepts together, where you’ve now added a new “Tab” (i.e. like the Configuration tab), and then sections within that tab with options.
http://dev.themeblvd.com/tutorial/putting-it-all-together/ (see section “The full code”)
Adding a new tab is the easiest part. That can take one line of code. Then the “id” you give that tab is what you’re going to reference when you create the section of options within.
When you create a section of options within that tab, you’ve got an array of options you’re passing in:
Each one of these options has a “type” where you can specify what kind of option it is (i.e. textfield, radio, textarea, etc).
We have an additional option type that’s not discussed in the documentation because it’s more advanced. The type ID is “social_media” — This is what we use when he have the option in some themes where people can select a social media icons for the header.
Do you have any child themes that might have some of these options? Or can I import some of these options from another theme?
If you’re wanting exact examples of how this is all done in our other themes, just take whatever other Theme Blvd theme you have and look in /includes/options.php. Here you’ll see all of these Theme Options API functions being referenced in the articles above. You can literally copy the code being used there into a Jump Start child theme. It’s all the same. In a way, everything within the “includes” folder of your Theme Blvd theme, is like a mini child theme within the theme modifying the base framework, which is essentially Jump Start.November 5, 2013 at 12:50 am #12828
Hey Thanks Jason,
Love your framework.
I have replaced the Jumpstart /includes/options.php with the Alyeska /includes/options.php and I can see the options and tabs in backend, and I can save, but they do not take effect. I did a search and replace and changed alyeska to jumpstart in the code, and got the same result. Do I need to do something additionally to get the new options from Alyeska to work?
Thanks, MichaelNovember 5, 2013 at 1:14 am #12831
Hm, there’s nothing else you should need to do as far as setting up the options and getting them to database, ready for use. There isn’t anything in that code that actually handles saving the options.
So, what doesn’t take effect? Or what exactly do you mean by that? When you save the options, you’re not seeing the correct results shown on the options form when the admin options page re-loads? Or do you mean you’re not seeing any results on the frontend of your website? Because this would all stuff you’d need to implement.November 5, 2013 at 2:46 am #12841
I can see changes in back-end but not front-end.
Per your earlier email: You can literally copy the code being used there into a Jump Start child theme. It’s all the same. In a way, everything within the “includes” folder of your Theme Blvd theme, is like a mini child theme within the theme modifying the base framework, which is essentially Jump Start.
So would I change the /includes/options.php in the root Jumpstart theme folder, or add and change to child-theme folder? Would I need to copy any more of the include files from the Alyeska theme or something into the new child-theme?
When I replace in root theme, again, I can see changes in backend, but they are not reflected on front end.
I am using the Default Starter Child Theme.
Thanks!November 5, 2013 at 4:12 am #12842
I thought we were just talking about options in terms of the admin side. Every option is implemented in a unique way on the frontend and is specific to the frontend of whatever theme. There’s not going to be any mass copy paste there for Jump Start in that regard. You’re going to have to dig in for each one and figure out how you want to implement it. Look through /includes/theme-functions.php of whatever theme and you’ll see most options implanted there.
- You must be logged in to reply to this topic.