SKT Welder Pro theme – problem with child theme and Theme options [solved]

Home Forums All Other Themes SKT Welder Pro theme – problem with child theme and Theme options [solved]

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #112503
    JimakoJimako
    Participant
    • Topics: 3
    • Replies: 3
    • Total: 6
    Member since: November 27, 2018

    Hi,
    SKT Welder Pro theme is not working with child theme out of box. I didn’t find this in documentation. Maybe this helps somebody.

    There are 2 ways how to detect theme options name in this theme:

    $themename = wp_get_theme();
    and
    $option_name = get_option( 'stylesheet' );

    This means that you can:
    1. to name your child theme the same name as your child theme folder (Theme Name in your child style.css)

    or you need to add this code to function.php in child theme:

    if ( ! is_admin() ) {
      function optionsframework_option_name() {
      	// Change this to use your theme slug
      	$themename = wp_get_theme();
      	$themename = preg_replace("/\W/", "_", strtolower($themename) );
       
      	return $themename;
      }
    }

    Otherwise you don’t get correct options values and your site doesn’t work.

    Edited: added test if it’s not admin area. Otherwise you get fatal error, because in admin area it works different way.

    #112542
    Sonnal S SinhaSonnal S Sinha
    Moderator
    • Topics: 0
    • Replies: 30643
    • Total: 30643
    Member since: August 16, 2013

    Hi,

    Do you want SKT Welder Pro child theme?

    Regards,
    Brad

    #112563
    JimakoJimako
    Participant
    • Topics: 3
    • Replies: 3
    • Total: 6
    Member since: November 27, 2018

    No, I am able to create it yourself. And I found some of yours for other theme. Problem is that there are problems with options.

    #112603
    Sonnal S SinhaSonnal S Sinha
    Moderator
    • Topics: 0
    • Replies: 30643
    • Total: 30643
    Member since: August 16, 2013

    Hi,

    I don’t understand what are you trying achieve, kindly explain in more details.

    Regards,
    Brad

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.