Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   ThemeFrame Presales (http://forum.bytesforall.com/forumdisplay.php?f=30)
-   -   Extendable through plugins (http://forum.bytesforall.com/showthread.php?t=15550)

pronetmedia Oct 3, 2011 09:49 AM

Extendable through plugins
 
I was wondering if ThemeFrame can be extended using plugins or through some other method. I would like to create an options page for each of my themes automated based on selected areas.

Also, is it possible to create your own template pages used by Theme Frame to create themes? For instance can I create a Theme Framework of pages and use Theme Frame to create new themes from that framework?

Any suggestions?

Kyle

Flynn Oct 3, 2011 07:40 PM

No, however you'll be able to create option pages (for the themes created with TF), with TF. This will come in the next-but-one version

You'll basically create a framework (if you choose to create option pages along with the theme) and then you expand on that framework.

I.e. you go in and edit template files to place the code to display values from the options.

Unlike the "create a theme" section, the options section in TF will be mostly manual. But very easy to follow:

You just copy from the examples and add your custom options. You just add a list (in form of an array as shown below) and all the radio buttons, textareas, text fields, image upload fields etc. will be created automatically from there. You may know this but to others reading this: This may look hard but is very easy and will not require PHP knowledge, you'll have an example for every use case (radio buttons, checkbox, checkbox-group, textarea, text input, image upload, color pickers, etc.):

PHP Code:

                ,array(
                    
'id'           => 'sometext'
                    
,'type'      => 'text'
                    
,'descr'     => 'A text input field named sometext'
                    
)
                ,array(
                    
'id'        => 'radio-something'
                    
,'type'         => 'radio'
                    
,'values'    => array( 
                                    
'option1'    => 'Option 1'
                                    
,'option2'    => 'Option 2'
                                    
,'option3'     => 'Option 3'
                                    
,'option4'     => 'And this is Option #4'
                                    
)
                    ,
'descr'     => 'Some radio buttons'
                    
)    
                ,array(
                    
'id'        => 'checkboxlist-something'
                    
,'type'         => 'checkbox-list'
                    
,'values'    => array( 
                                    
'option1'    => 'Checkbox 1'
                                    
,'option2'    => 'Another checkbox'
                                    
,'option3'     => 'Check this'
                                    
,'option4'     => 'And this is checkbox #4'
                                    
)
                    ,
'descr'     => 'This is a group of checkboxes. If you want to let users choose none, one or multiple things from a list'
                    

                ,array(
                    
'id'           => 'textarea1'
                    
,'type'      => 'textarea'
                    
,'descr'     => 'A textarea with the id "textarea1". Useful for text, incl. code, that is not supposed to fit into a single line text field'
                    


Then in the template files, wherever you want to display a value from the options page, you'd simply put something like this:

PHP Code:

<?php echo $options['sometext']; ?>

That would display whatever the user has put into the text field with the id "sometext".


To sum his up:

All you do is list all your options sections and the options therein, in one single, possibly huge file. You just list them, surrounded with those brackets and divided with commas, as shown.

Then, in any theme template where you want to display one of the user options, you just put a very basic piece of PHP code (like the examples above).

You don't do anything else. The creation of the option pages, the saving and reading, the validation, everything is taken care. Regardless of that you'll be able to build very huge and flexible option pages.

<?php echo $options['the_option_id']; ?>

pronetmedia Oct 4, 2011 07:38 AM

Thanks Flynn, I will play with the RC3 version since I am a new user. Maybe you answered this but, can I create my own Template pages and then when you click the new page have my page show up?

I was kinda hoping to create an option template page with the most common theme areas a user would want to change and then allow that template page to be referenced by theme options. I am ok with manually adding code to activate the options. I just want the template to be available with the other TF templates list.

I was developing a similar tool, but was impressed and abandoned my project and purchased yours.

Thank you,

Kyle

Flynn Oct 4, 2011 10:27 AM

Yes, you can

- add more basic standard WP templates (date.php, tag.php...)
- add standard WP templates with parameters (author-ID.php, category-SLUG.php)
- add custom page templates (whatever.php, eref8gg9.php)

When the created theme is activated in WP, the custom page templates become available in the WP write panel and can be assigned to any page.

As a little extra feature, the default WP templates are also available as custom page templates, in addition to being used by WP automatically, according to the WP template hierarchy.


All times are GMT -6. The time now is 12:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.