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.


Adding a Styles Tab in Theme Options

  • Creator
  • #17316
    Alan Cohen

    I am reading through this article and trying to add a tab to the Theme Options to allow the quick updating of fonts (color, size) and background colors etc.

    First I am unsure which php file I need to be editing to make sure I am altering the correct files because I am going through the php files in the API folder and adding the code but the new tab is not showing up for me to even test any further.

    Any help would be appreciated I feel some important information might be missing from that article it would be helpful to know which files i need to edit rather than me hunting down code snip-its in a bunch of files and hoping they are the right ones.

Viewing 1 replies (of 1 total)
  • Author
  • #17318
    Jason Bobich

    Hello Alan,

    Don’t worry; there’s no files to go hunting around in. If there were, I’d tell you. 😉

    When you’re editing a WordPress theme, all of your PHP code, that isn’t a direct template output (i.e. within a template file), goes in your functions.php. So, unless you’re editing a specific template file output, all of your PHP code — actions, filters, functions, etc — goes in your child theme’s functions.php.

    In case I’m not explaining well, here’s a better explanation in depth of the functions.php file:

    Then from there, if you want to organize all of your code to split among different files, you’d be structuring everything stemming from your child theme’s functions.php.

    None of this is specific to any of the tutorials you’re referencing. It’s just general information about how WordPress theming works. So feel free to organize your code how you like, in whatever files you want.

    For example, in the parent theme framework, I include a file /framework/themeblvd.php in functions.php. Then in that file, I include all other PHP files of the framework.

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