Closed bassjobsen closed 10 years ago
Hi Mark,
if(!defined('footer_widgets_number'))define('footer_widgets_number', 2);
Will be the right way to go. Problem here is footer_widgets_number was not set in library/core.php yet. I will add this in the next update this list will contain:
/* navbar */
if(!defined('navbar_style'))define('navbar_style','default');
if(!defined('navbar_background_color'))define('navbar_background_color',false);
if(!defined('navbar_border_color'))define('navbar_border_color',false);
if(!defined('navbar_link_color'))define('navbar_link_color',false);
if(!defined('navbar_linkhover_color'))define('navbar_linkhover_color',false);
if(!defined('navbar_linkhoverbackground_color'))define('navbar_linkhoverbackground_color',false);
if(!defined('navbar_activelink_color'))define('navbar_activelink_color',false);
if(!defined('navbar_activebackground_color'))define('navbar_activebackground_color',false);
if(!defined('navbar_search'))define('navbar_search',1);
if(!defined('navbar_account'))define('navbar_account',1);
if(!defined('navbar_cart'))define('navbar_cart',1);
/* logo text */
if(!defined('logo_link_color'))define('logo_link_color',false);
if(!defined('logo_linkhover_color'))define('logo_linkhover_color',false);
/* logo */
if(!defined('logo_image_position'))define('logo_image_position','in-nav');
if(!defined('logo_image'))define('logo_image','');
if(!defined('logo_outside_nav_text_align'))define('logo_outside_nav_text_align','left');
/* footer */
if(!defined('footer_width'))define('footer_width','cont-width');
if(!defined('footer_bg_color'))define('footer_bg_color',false);
if(!defined('footer_text_color'))define('footer_text_color',false);
if(!defined('footer_link_color'))define('footer_link_color',false);
if(!defined('footer_linkhover_color'))define('footer_linkhover_color',false);
if(!defined('footer_widgets_number'))define('footer_widgets_number',4);
/* disable LESS / Customizer / Options */
if(!defined('jbst_less'))define('jbst_less',1);
if(!defined('jbst_customizer'))define('jbst_customizer',1);
if(!defined('jbst_options'))define('jbst_options',1);
/* site color */
if(!defined('link_color'))define('link_color',false);
/* */
if(!defined('container_width'))define('container_width','1200');
All the setting above can be overwritten in your child theme by (re)define them in function.php in your child theme's folder:
function jbst_child_set_defaultoptions() {
/* footer */
if(!defined('footer_widgets_number'))define('footer_widgets_number',2);
As you see not all of customizer's settings are add in this structure. I expect they should be in future. Till now i have add them with care. I'm not 100% sure the method used now will be fit everybody's needs, see also: http://wordpress.stackexchange.com/questions/129479/alternatives-to-handle-customizer-settings. Also some settings will be interrelated and should add with care for example see: https://github.com/bassjobsen/jamedo-bootstrap-start-theme/issues/95
Hope the above (adding the footer_widgets_number
setting) will solve your issue. If you miss any other setting please let me know i will add them a.s.a.p.
NB Don't forget to remove old theme mods from the database before setting the default value. (remove_theme_mods()
)
Question from @mjteves1986: My goal is to make childtheme default layout. Changes the default on parent and make a default on childthemes layout. This is the changes make a default footer widget display, also on the admin widget like adding on function.php if(!defined('footer_widgets_number'))define('footer_widgets_number', 2); But that changing is not working on frontend.