• ashiquzzaman

    (@ashiquzzaman)


    The idea is – Once installing a new theme, You have pre-build theme presets lined up in customizer and from there users can select any presets they like. Much this – https://optimizerwp.com/templates/
    Google, GitHub search didn’t help, ANY help would be appreciated

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Hi ashiquzzaman!

    If I’m understanding your question, you want to know about theme defaults? This would really depend on how the theme is coded. Themes can generally use get_option or get_theme_mod. Both of the functions work fairly similarly in that it takes in two parameters. The first one being the setting, or option, you want to retrieve from the database and the second being a default value if there is no value set in the database.

    So, let’s say we had a theme that used a default color of blue for an outline. We would using something like:

    // using customizer API
    echo get_theme_mod( 'outline-color', '0000fff' );
    // Options API
    echo get_option( 'j_theme['outline_color'], '0000ff' );

    Let us know if that helps!

    Thread Starter ashiquzzaman

    (@ashiquzzaman)

    Hey Jose Castaneda, Thank for your response. I’m really interested to know is that how optimizer doing these Theme Presets stuff, any guideline would be appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to create theme Presets’ is closed to new replies.