Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1284387

    Hi,
    Is it possible to change theme options (most importantly; color scheme and layout (boxed/stretched) on a per page basis?
    Any hook for this?

    Thanks a lot, WZ

    #1286729

    Hey WZ,

    Thanks for contacting us and sorry for the late reply!

    I am afraid that would not be easily possible. You would either need to heavily modify theme files or use custom CSS to adjust those pages.

    Best regards,
    Yigit

    #1286793

    Hi,
    Thanks for getting back to me. I did find some posts like: https://kriesi.at/support/topic/stretched-layout-on-home-page-only-and-boxed-layout-on-all-other-pages/
    So I expected a bit more help here.
    Can’t the used colorscheme be manipulated by some kind of filter or maybe a CSS override?

    Thanks

    #1286806

    A custom color scheme you can have by this in your child-theme functions.php and the filter: avf_skin_options
    ( you find the existing color-schemes in folder: enfold – includes – admin : register-backend-styles.php
    but that would not help you to have on page1 that color-scheme and on a different page the other.

    
    function my_custom_added_style_function($styles = "") {
    
      $default_primary  = "#2d5c88";
      $default_highlight  = "#3d71a1";
      $default_background = "#041424";
      $special_border   = "#0A2138";
    
    //put your own Name for the style
      $styles["Guennis Style"] = array(    
                  "style"=>"background-color:$default_primary;",
                  "default_font" => "Open Sans:400,600",
                  "google_webfont" => "Open Sans:400,600",
                  "color_scheme"  =>"Guennis Style",
                  
                  // header
                  "colorset-header_color-bg"        =>"#ffffff",
                  "colorset-header_color-bg2"       =>"#f8f8f8",
                  "colorset-header_color-primary"     =>"$default_primary",
                  "colorset-header_color-secondary"   =>"#444444",
                  "colorset-header_color-color"     =>"#333333",
                  "colorset-header_color-border"      =>"#e1e1e1",
                  "colorset-header_color-img"       =>"",
                  "colorset-header_color-customimage"   =>"",
                  "colorset-header_color-pos"       => "top center",
                  "colorset-header_color-repeat"      => "repeat",
                  "colorset-header_color-attach"      => "scroll",
                  'colorset-header_color-heading'     => '#000000',
                  'colorset-header_color-meta'      => '#808080',
                  
                  // main
                  "colorset-main_color-bg"        =>"#ffffff",
                  "colorset-main_color-bg2"       =>"#fcfcfc",
                  "colorset-main_color-primary"     =>"$default_primary",
                  "colorset-main_color-secondary"     =>"$default_highlight",
                  "colorset-main_color-color"       =>"#666666",
                  "colorset-main_color-border"      =>"#e1e1e1",
                  "colorset-main_color-img"       =>"",
                  "colorset-main_color-customimage"   =>"",
                  "colorset-main_color-pos"         => "top center",
                  "colorset-main_color-repeat"      => "repeat",
                  "colorset-main_color-attach"      => "scroll",
                  'colorset-main_color-heading'       => '#222222',
                  'colorset-main_color-meta'        => '#919191',
                  
                  // alternate
                  "colorset-alternate_color-bg"     =>"#fcfcfc",
                  "colorset-alternate_color-bg2"      =>"#ffffff",
                  "colorset-alternate_color-primary"    =>"$default_primary",
                  "colorset-alternate_color-secondary"  =>"$default_highlight",
                  "colorset-alternate_color-color"    =>"#666666",
                  "colorset-alternate_color-border"   =>"#e1e1e1",
                  "colorset-alternate_color-img"      => "",
                  "colorset-alternate_color-customimage"  =>"",
                  "colorset-alternate_color-pos"      => "top center",
                  "colorset-alternate_color-repeat"     => "repeat",
                  "colorset-alternate_color-attach"     => "scroll",
                  'colorset-alternate_color-heading'    => '#222222',
                  'colorset-alternate_color-meta'     => '#8f8f8f',
                              
                  // Footer
                  "colorset-footer_color-bg"        =>"#222222",
                  "colorset-footer_color-bg2"       =>"#333333",
                  "colorset-footer_color-primary"     =>"#ffffff",
                  "colorset-footer_color-secondary"   =>"#aaaaaa",
                  "colorset-footer_color-color"     =>"#dddddd",
                  "colorset-footer_color-border"      =>"#444444",
                  "colorset-footer_color-img"       => "",
                  "colorset-footer_color-customimage"   =>"",
                  "colorset-footer_color-pos"       => "top center",
                  "colorset-footer_color-repeat"      => "repeat",
                  "colorset-footer_color-attach"      => "scroll",
                  'colorset-footer_color-heading'     => '#919191',
                  'colorset-footer_color-meta'      => '#919191',
                  
                  // Socket
                  "colorset-socket_color-bg"        =>"#333333",
                  "colorset-socket_color-bg2"       =>"#555555",
                  "colorset-socket_color-primary"     =>"#ffffff",
                  "colorset-socket_color-secondary"   =>"#aaaaaa",
                  "colorset-socket_color-color"     =>"#eeeeee",
                  "colorset-socket_color-border"      =>"#444444",
                  "colorset-socket_color-img"       =>"",
                  "colorset-socket_color-customimage"   =>"",
                  "colorset-socket_color-pos"       => "top center",
                  "colorset-socket_color-repeat"      => "repeat",
                  "colorset-socket_color-attach"      => "scroll",
                  'colorset-socket_color-heading'     => '#ffffff',
                  'colorset-socket_color-meta'      => '#999999',
                  
                  //body bg
                  "color-body_style"            =>"stretched",
                  "color-body_color"            =>"#333333", //bg
                  "color-body_fontcolor"          =>"#ffffff", //font
                  "color-body_attach"           =>"scroll",
                  "color-body_repeat"           =>"repeat",
                  "color-body_pos"            =>"top center",
                  "color-body_img"            => "",
                  "color-body_customimage"        =>"",
                  
      );
      
      return $styles;
    }
    add_filter('avf_skin_options', 'my_custom_added_style_function');
    #1286821

    the other layout change could be done via filter: avf_header_setting_filter
    f.e.:

    add_filter('avf_header_setting_filter','av_change_header_style');
    function av_change_header_style($header){
        if(is_page('2089')){
            $header['header_position'] = "header_left header_sidebar";
            //think of the classes to set - and the first class in that list has to have that one space before !
            $header['header_class'] .= " av_header_left av_header_sidebar";
        }
        return $header; 
    }
    #1286824

    Hey,


    @guenni007
    Thanks for your help as always! :)

    Regards,
    Yigit

    #1286826

    you can add a lot of additional settings above

    $header['header_shrinking']   =  'header_shrinking';
    $header['header_class'] .= " av_header_shrinking";

    or

    $header['header_transparency'] = 'header_transparency';
    $header['header_class'] .= " av_header_transparency";

    but some of the settings are mutually exclusive. So I don’t know if a header on the left with a transparent header makes sense.

    #1286828

    the boxed layout / stretched layout ? i have a look if it is possible …
    that seem to be solved by css only
    f.e: for home
    #top.boxed.home { width: 100% !important; max-width: 100% !important; }

    layout framed to stretched is harder to get
    maybe this is a good start but there had to be other adjustment to do i guess:

    because the postid-xy or the page-id-xy goes to html as class: html_entry_id_xy

    .html_entry_id_395 .av-frame {
    	display:none !important
    }
    html.html_av-framed-box.html_entry_id_395 {
      padding: 0;
    }
    .html_header_top.html_header_sticky.html_av-framed-box.html_entry_id_395 #header_main, 
    .html_header_top.html_header_sticky.html_av-framed-box.html_entry_id_395 #header_meta {
      margin: 0;
    }
    html.html_entry_id_395 .avia-post-nav.avia-post-next {
      right: 0 !important;
    }
    html.html_entry_id_395 .avia-post-nav.avia-post-prev {
      left: 0 !important
    }
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.