Tagged: menu
-
AuthorPosts
-
July 23, 2013 at 3:04 pm #26622
Hi everyone,
I’m just a bit lost in one things:
I will have a Header Fixed with social on the home page and a Small non fixes header type in the other page of the site.
I just don’t understand and find how to do that like is available in the demo page.
(http://kriesi.at/themedemo/?theme=enfold)
Thanks for any help!
Caiser
July 24, 2013 at 5:00 am #131057Hey!
As far as I know you can’t set different header for different pages by default. Kriesi’s demo page just demonstrates all header but there’s no option to switch the header type from page to page.
You can try to add a meta field to posts/pages to switch the header. Open up functions.php and insert following code at the bottom:
add_filter('avf_builder_boxes', 'register_meta_boxes', 10, 1);
function register_meta_boxes($boxes)
{
$boxes[] = array( 'title' =>__('Header Type','avia_framework' ), 'id'=>'header_type', 'page'=>array('page' , 'post'), 'context'=>'side', 'priority'=>'low');
return $boxes;
}
add_filter('avf_builder_elements', 'register_meta_elements', 10, 1);
function register_meta_elements($avf_builder_elements)
{
$avf_builder_elements[] = array(
"slug" => "header_type",
"name" => "Header Type",
"desc" => "Which header type do you want to use?",
"id" => "header_setting",
"type" => "select",
"std" => "",
"class" => "avia-style",
"subtype" => array( 'Default' => '',
'Small fixed Header' =>'fixed_header',
'Small non-fixed Header'=>'nonfixed_header',
'Fixed Header with Social Icons and additional Navigation'=>'fixed_header social_header',
'Non-fixed Header with Social Icons and additional Navigation'=>'nonfixed_header social_header',
'Header with Social Icons and bottom Navigation'=>'nonfixed_header social_header bottom_nav_header',
));
return $avf_builder_elements;
}Best regards,
Peter
July 24, 2013 at 7:19 am #131058Hi Peter, many thanks for reply!
Heee it looks that I have an sintax error in the first part but I can’t identify where…
—
add_filter(‘avf_builder_boxes’, ‘register_meta_boxes’, 10, 1);
function register_meta_boxes($boxes)
{
$boxes[] = array( ‘title’ =>__(‘Header Type’,’avia_framework’ ), ‘id’=>’header_type’, ‘page’=>array(‘page’ , ‘post’), ‘context’=>’side’, ‘priority’=>’low’),
return $boxes;
}
—
Caiser
July 24, 2013 at 7:58 am #131059Hi!
Should work now – I corrected the code.
Best regards,
Peter
July 24, 2013 at 1:04 pm #131060Ohhh yess! :)
Thank you so much.
-
AuthorPosts
- The topic ‘Different header type for different page, how?’ is closed to new replies.