This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Tagged: 

Add Configuration and Social Media Tabs To Backend

  • Creator
    Topic
  • #12821
    Michael Stadulis
    Participant

    Hi,

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #12826
    Jason Bobich
    Keymaster

    Hello,

    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.

    http://dev.themeblvd.com/tutorial/addremove-options-tab/

    When you create a section of options within that tab, you’ve got an array of options you’re passing in:

    http://dev.themeblvd.com/tutorial/addremove-options-section/

    Each one of these options has a “type” where you can specify what kind of option it is (i.e. textfield, radio, textarea, etc).

    http://dev.themeblvd.com/tutorial/formatting-options/

    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.

    #12828
    Michael Stadulis
    Participant

    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, Michael

    #12831
    Jason Bobich
    Keymaster

    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.

    #12841
    Michael Stadulis
    Participant

    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!

    #12842
    Jason Bobich
    Keymaster

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.