inbetweening
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Bodymovin] Uploader crashing/not showing animationUpdate: I managed to fix this, or more I found a work around.
Exports that use Joysticks n Sliders will normally work in and of themselves (if hidden/guide layers are turned on in the Bodymovin export settings) but when uploaded to WP Bodymovin, they somehow aren’t compatible.
The way to get around this is to bake all of the expressions, however this will will put a keyframe on every frame and make a huge file. Delete all of the tweened frames, match up your keyframes with the Joystick/Slider keyframes, delete the Joystick/Slider layers and export without hidden layers/guides (unless you need them for something else). Works fine with WP Bodymovin.
Forum: Plugins
In reply to: [WP Bodymovin] Uploader crashing/not showing animationUpdate, a bit more testing has confirmed that the issue issue is definitely down to Joysticks n Sliders. Is there any way to get around this? Baking the expressions makes the .json file about 9MB which completely overloads the plug in and causes it to crash before it’s even uploaded. Keeping the expressions means it uploads but won’t appear at all.
Forum: Developing with WordPress
In reply to: Adding customisable colours to child themeI hadn’t, that’s fixed it!
Thanks a lot.
Forum: Developing with WordPress
In reply to: Adding customisable colours to child themeIt’s not changing in preview or on the page. When I go back to edit the colour is saved on the option, but nothing has actually changed on the page/preview itself.
- This reply was modified 8 years, 2 months ago by inbetweening.
Forum: Developing with WordPress
In reply to: Adding customisable colours to child themeMade a bit of progress but something’s not quite right. I managed to locate the functions in the original theme’s functions file. I also found that it linked to a customize.php file in the ‘inc’ folder. I added some details in and it worked, but I thought it better to move these into the child theme functions.php file. So I basically copied out those functions from functions.php and customize.php into my own functions.php, added ‘child’ to the function names (and anywhere else I saw the name). Now it shows as an option in the customize panel, but changing the colour does nothing.
I’ll be honest, I have pretty much no idea what any of these things mean below…but it seems I’ve missed something between copying it from the parent functions to the child functions… Any ideas?
function ruffie_child_curtomize_register( $wp_customize ){ // Header background color $wp_customize->add_setting( 'header_background_color', array( 'default' => '#fffff', 'sanitize_callback' => 'sanitize_hex_color' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_background_color', array( 'label' => __( 'Header Background Color', 'ruffie' ), 'section' => 'colors', 'settings' => 'header_background_color', ) ) ); } add_action('customize_register', 'ruffie_child_curtomize_register'); function ruffie_child_sanitize_checkbox( $input ) { // Boolean check return ( ( isset( $input ) && true == $input ) ? true : false ); } function ruffie_child_customize_styles(){ $options = [ esc_attr( get_theme_mod('header_background_color', '#ffffff') ) ]; $css = ' *, .site-header-wrapper{ background-color: %1$s; } '; wp_add_inline_style( 'ruffie-child-style', vsprintf($css, $options) ); } add_action( 'wp_enqueue_scripts', 'ruffie_child_customize_styles' );
Forum: Developing with WordPress
In reply to: Adding customisable colours to child themeThanks both, I was doing it using CSS but I thought it would be easier to experiment with colours in the customizer so I could see a live example. I’ll have a look through that Stackexchange post and the Customize API and see if I can get my head around it!
Thanks,
Steve