andrezrv / aletheia

A child theme for Follet
http://aletheiademo.andrezrv.com/
GNU General Public License v2.0
2 stars 0 forks source link

option for disabling header parallax effect #4

Open illtellyoulater opened 9 years ago

illtellyoulater commented 9 years ago

Hi, it'd be nice to have an option in appearance>customize to disable header background parallax effect.

andrezrv commented 9 years ago

Hi there! I think you're right, that'd be a great feature. I'll look forward to add it to the next version of the theme.

Thank you very much for your suggestion :)

illtellyoulater commented 9 years ago

Glad you find it useful as a suggestion :) In my limited WP knowledge all I did for now was:

add_action( 'follet_options_register', 'set_parallax_off' );

function set_parallax_off() {
    follet_register_option( 'parallax_header', false );
}

I put that into a "code snippet" (plugin) in order to not get messy with aletheia's functions.php in case this is updated, but I guess that's not optimal because it will still inject JS code and load it even if that's not going to be used? Well anyway thanks for working on this child theme, it looks nice, I just didn't need parallax for a specific project. :+1:

andrezrv commented 9 years ago

Great to see that you found how to solve it on your own, that's in fact the most recommended method to do it :)

As for the JS code, it doesn't get loaded (or at least it shouldn't) in case the parallax header is disabled.

illtellyoulater commented 9 years ago

Allright.. it's just coming back to me that I was actually pretty sure that it would not load, but I keep forgetting the whole picture every 2 days when it's about something that I am not familiar with :) Need more brain RAM ;) Thanks for relieving some unnecessary worrying then!