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.

Switching to child theme

  • Creator
    Topic
  • #3147
    cowboymike
    Participant

    Howdy Jason,
    I am one of those guys who has just about ready to go live with my Alyeska theme site. I have added a little custom css in the appropriate box in the theme options section.

    I would like to install the child theme and activate it. Can you tell me what I need to do to make the transition and save all my current settings? I am using Alyeska 2.1.5.
    Happy trails, cowboy Mike

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #3170
    Jason Bobich
    Keymaster

    Your theme options (I’m only referring to Appearance > Theme Options) are saved based on the name of the current theme. So, if you were to activate a Child theme with a different name, that will change.

    The only way to get around the pain of taking 5-10 mins to reconfigure your theme options page after switching to a Child theme would be to do this:

    function my_option_id( $option_id ) {
        $option_id = 'alyeska';
        return $option_id;
    }
    add_filter( 'themeblvd_option_id', 'my_option_id' );

    (This would go in the bottom of your Child theme’s functions.php)

    This is from here: http://dev.themeblvd.com/tutorial/saving-theme-options-and-switching-themes/

    #3178
    cowboymike
    Participant

    Thank you Jason. I would be installing and activating the Alyeska child theme. Do I add that code prior to activating the Alyeska child theme or after? ❓

    And then should I remove the custom css from the box in the theme options section and put it in the child theme?

    #3179
    Jason Bobich
    Keymaster

    Do I add that code prior to activating the Alyeska child theme or after?

    It honestly doesn’t matter.

    And then should I remove the custom css from the box in the theme options section and put it in the child theme?

    Yup, that’s the idea. You’d put it in custom.css — Watch this video: https://vimeo.com/41331677

    #3631
    cowboymike
    Participant

    Howdy Jason,
    I got confused.

    Should I add the code you suggested above to the child theme’s functions.php or would I use the following?

    function my_option_id( $option_id ) {    $theme_data = wp_get_theme( get_template() ); // From parent theme    $option_id = preg_replace('/W/', '', strtolower( $theme_data->get('Name') ) );    return $option_id;}add_filter( 'themeblvd_option_id', 'my_option_id' );

    Happy trails, Mike

    • This reply was modified 7 years, 7 months ago by cowboymike.
    • This reply was modified 7 years, 7 months ago by cowboymike.
    • This reply was modified 7 years, 7 months ago by Jason Bobich.
    #3634
    Jason Bobich
    Keymaster

    Do this:

    nction my_option_id( $option_id ) {
        $option_id = 'alyeska';
        return $option_id;
    }
    add_filter( 'themeblvd_option_id', 'my_option_id' );

    … although both will technically achieve the identical result. However, this way you’re doing less work to get there.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.