Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #538682

    hi enfold team,

    first: thx for the help last days. great team

    now the question:

    i removed on the search page the sidebar with followig code in my child fuctions.php:

     add_filter('avf_form_mail_field_values', 'avia_change_checkbox_return_values', 10, 4);
    function avia_change_checkbox_return_values($value, $new_post, $form_elements, $form_params){
    if($value == 'false') $value = 'Nein';
    if($value == 'true') $value = 'Ja';
    return $value;
    }
    
    add_action( 'ava_search_after_get_header', 'my_ava_search_after_get_header', 10 );
     
     function my_ava_search_after_get_header()
     {
    	global $avia_config;
    	 
    	$avia_config['layout']['current'] = $avia_config['layout']['fullsize'];
    	$avia_config['layout']['current']['main'] = 'fullsize';
    	
     }

    how is the code for the search & 404 page together?

    • This topic was modified 9 years, 1 month ago by volmering.
    #540054

    Hey volmering!

    Thank you for using Enfold.

    Do you want to remove the sidebar on 404 page? Please add this:

    add_filter('avia_layout_filter', 'avia_change_post_layout', 10, 2);
    function avia_change_post_layout($layout, $post_id) {
        if( is_404() ) {
            $layout['current'] = $layout['fullsize'];
            $layout['current']['main'] = 'fullsize';
        }
    
        return $layout;
    }
    

    Regards,
    Ismael

    #542416

    hey ismael,

    thx alot

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘remove sidebar on 404-page with functions.php’ is closed to new replies.