-
AuthorPosts
-
June 1, 2017 at 11:52 am #802489
hi. how can i change the look of the error page.
for example if i delete a blog entry and you open the old URL you get this page.
June 1, 2017 at 2:49 pm #802564Hey diefleischerei,
You will need to modify 404.php to change the look of the error page, you can find it in the enfold folder, and also some css tweaks in Quick CSS (located in Enfold > General Styling). Hope this helps.
Best regards,
NikkoJune 1, 2017 at 3:13 pm #802582Great. I only want a blank white site with the header menu and a small text with a view lins and one image. no footer widgets and no sidebars. can you help me with this?
thank you so much nikko :) greetings, Alex
June 2, 2017 at 2:22 pm #803035Hi,
Try to replace the contents of 404.php with this: https://pastebin.com/w99RvvrV
Replace the Image Here text with the image you want to use. Then in Quick CSS (located in Enfold > General Styling), add this css code:
.error404 #footer { display: none; }
Hope this helps :)
Best regards,
NikkoJune 2, 2017 at 2:46 pm #803043Wow cool Nikko.
So, i paste
<?php if ( !defined('ABSPATH') ){ die(); } global $avia_config; /* * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory. */ get_header(); echo avia_title(array('title' => __('Error 404 - page not found', 'avia_framework'))); do_action( 'ava_after_main_title' ); ?> <div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'> <?php do_action('avia_404_extra'); // allows user to hook into 404 page fr extra functionallity. eg: send mail that page is missing, output additional information ?> <div class='container'> <main class='template-page content <?php avia_layout_class( 'content' ); ?> units' <?php avia_markup_helper(array('context' => 'content'));?>> <div class="entry entry-content-wrapper clearfix" id='search-fail'> Image Here </div> <!--end content--> </main> </div><!--end container--> </div><!-- close default .container_wrap element --> <?php get_footer(); ?>
in the functions.php of my child theme? and where must i put:`<?php
if ( !defined(‘ABSPATH’) ){ die(); }global $avia_config;
/*
* get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
*/
get_header();echo avia_title(array(‘title’ => __(‘Error 404 – page not found’, ‘avia_framework’)));
do_action( ‘ava_after_main_title’ );
?><div class=’container_wrap container_wrap_first main_color <?php avia_layout_class( ‘main’ ); ?>’>
<?php
do_action(‘avia_404_extra’); // allows user to hook into 404 page fr extra functionallity. eg: send mail that page is missing, output additional information
?><div class=’container’>
<main class=’template-page content <?php avia_layout_class( ‘content’ ); ?> units’ <?php avia_markup_helper(array(‘context’ => ‘content’));?>>
<div class=”entry entry-content-wrapper clearfix” id=’search-fail’>
Image Here
</div><!–end content–>
</main></div><!–end container–>
</div><!– close default .container_wrap element –>
<?php get_footer(); ?>`
June 2, 2017 at 5:13 pm #803109Hi,
No, not in functions.php, you must replace the content of 404.php
Try to replace the contents of 404.php with this: https://pastebin.com/w99RvvrV
Best regards,
NikkoJune 2, 2017 at 5:23 pm #803115OK Nikko, but what sould i do with the RAW Paste Data code?
June 2, 2017 at 5:26 pm #803116and should i copy the 404.php from the enfold directory to the child directory?
June 2, 2017 at 5:27 pm #803119will the 404.php file in the child directory automatically replace the 404 in the enfold directory?
June 2, 2017 at 5:29 pm #8031241) i have copied the 404 to the child directory
2) i have replaced the code:<?php if ( !defined('ABSPATH') ){ die(); } global $avia_config; /* * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory. */ get_header(); echo avia_title(array('title' => __('Error 404 - page not found', 'avia_framework'))); do_action( 'ava_after_main_title' ); ?> <div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'> <?php do_action('avia_404_extra'); // allows user to hook into 404 page fr extra functionallity. eg: send mail that page is missing, output additional information ?> <div class='container'> <main class='template-page content <?php avia_layout_class( 'content' ); ?> units' <?php avia_markup_helper(array('context' => 'content'));?>> <div class="entry entry-content-wrapper clearfix" id='search-fail'> Image Here </div> <!--end content--> </main> </div><!--end container--> </div><!-- close default .container_wrap element --> <?php get_footer(); ?>
3) what is with the RAW Paste Data ?
June 2, 2017 at 5:29 pm #803125this is the look of the error page now
June 2, 2017 at 5:32 pm #803126can i load this page: http://www.lowcarbx.com/404-2/ as my error page?
then i can edit the page if i want and the error page will get this look? right?
June 2, 2017 at 8:00 pm #803181Hi,
No, but you can copy the style from that page, just enable Avia Layout Builder Debug: http://kriesi.at/documentation/enfold/enable-advanced-layout-builder-debug/
then at the bottom of your content you should see some shortcodes, just copy it then in 404.php, instead of the image you can put:<?php echo do_shortcode('[your_shortcode_here]'); ?>
And that should do it :)
Best regards,
NikkoJune 5, 2017 at 3:38 pm #803986OK thank you Nikko.
I have the code fom the 404-2 page:
[av_section min_height='' min_height_px='500px' padding='default' shadow='no-shadow' bottom_border='no-border-styling' bottom_border_diagonal_color='#333333' bottom_border_diagonal_direction='scroll' bottom_border_style='scroll' scroll_down='' id='' color='main_color' custom_bg='' src='' attach='scroll' position='top left' repeat='no-repeat' video='' video_ratio='16:9' video_mobile_disabled='' overlay_enable='' overlay_opacity='0.5' overlay_color='' overlay_pattern='' overlay_custom_pattern='' av_element_hidden_in_editor='0'] [av_image src='http://www.lowcarbx.com/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/images/placeholder.jpg' align='center' styling='' hover='' link='' target='' caption='' font_size='' appearance='' overlay_opacity='0.4' overlay_color='#000000' overlay_text_color='#ffffff' animation='no-animation'][/av_image] [av_textblock size='' font_color='' color='' custom_class='' admin_preview_bg=''] <p style="text-align: center;">ERROR 404</p> [/av_textblock] [/av_section]
the code of my 404.PHP is this at them moment:
<?php if ( !defined('ABSPATH') ){ die(); } global $avia_config; /* * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory. */ get_header(); echo avia_title(array('title' => __('Error 404 - page not found', 'avia_framework'))); do_action( 'ava_after_main_title' ); ?> <div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'> <?php do_action('avia_404_extra'); // allows user to hook into 404 page fr extra functionallity. eg: send mail that page is missing, output additional information ?> <div class='container'> <main class='template-page content <?php avia_layout_class( 'content' ); ?> units' <?php avia_markup_helper(array('context' => 'content'));?>> <div class="entry entry-content-wrapper clearfix" id='search-fail'> Image Here </div> <!--end content--> </main> </div><!--end container--> </div><!-- close default .container_wrap element --> <?php get_footer(); ?>
where should i place the avia code from the 404-2 page inside the 404.php ? Thanks for you help. and after placing the code, i can delete the 404-2 page? is this right? i only need the code not the page?
Thank you, Alex
June 6, 2017 at 6:41 am #804319Hi,
Yes, you are right. As for the code, just remove this text in 404.php:
Image Here
and replace it with:
<?php echo do_shortcode("[av_section min_height='' min_height_px='500px' padding='default' shadow='no-shadow' bottom_border='no-border-styling' bottom_border_diagonal_color='#333333' bottom_border_diagonal_direction='scroll' bottom_border_style='scroll' scroll_down='' id='' color='main_color' custom_bg='' src='' attach='scroll' position='top left' repeat='no-repeat' video='' video_ratio='16:9' video_mobile_disabled='' overlay_enable='' overlay_opacity='0.5' overlay_color='' overlay_pattern='' overlay_custom_pattern='' av_element_hidden_in_editor='0'] [av_image src='https://www.lowcarbx.com/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/images/placeholder.jpg' align='center' styling='' hover='' link='' target='' caption='' font_size='' appearance='' overlay_opacity='0.4' overlay_color='#000000' overlay_text_color='#ffffff' animation='no-animation'][/av_image] [av_textblock size='' font_color='' color='' custom_class='' admin_preview_bg=''] <p style="text-align: center;">ERROR 404</p> [/av_textblock] [/av_section]"); ?>
Hope this helps.
Best regards,
NikkoJune 6, 2017 at 10:20 am #804425Now i get an syntax error on 404
:(
June 6, 2017 at 11:26 am #804446Hi,
Can you give us ftp access? so I can try to add it and also if you can give us temporary admin access as well. Just place the details in Private Content when you reply.
Best regards,
NikkoJune 6, 2017 at 11:51 am #804458:)
is use a child theme an have added the 404 to the child folder. thank you nikko
June 7, 2017 at 1:27 am #804765Hi,
Thanks for providing the admin access, it’s fixed now. I noticed that this part of the code is using double quotes:
<p style="text-align: center;">ERROR 404</p>
I replaced it with:
<p style='text-align: center;'>ERROR 404</p>
Hope it’s good :)
Best regards,
NikkoJune 7, 2017 at 11:53 am #805040:) Thank you Nikko.Only some questions. the 404 page looks strange. http://imgur.com/a/gf1AP
How can i delete this space (A) – only on the 404 page – it is perfect at all other pages.
How can i set this linke to white font color. (B) – only on the 404 page – it is perfect at all other pages.
And how (C) can i let the backgorunds run over the whole widh? – only on the 404 page – it is perfect at all other pages.
June 8, 2017 at 1:31 am #805412Hey Nikko, can you please cancel the changes. because of the changes there are troubles with the sidebar menu here.
so please cancel it. i really need the sidebar workng. thank you :) http://imgur.com/a/J5q3q
the sidebar should be at the left top postion. becaus of the code there is an error :(
June 8, 2017 at 8:42 am #805458Hi,
I have modified the 404 page again ( https://pastebin.com/mEyLEnC7 ) and I think it should be better, as for the problem with sidebar, 404 page is a separate page and won’t affect it, the problem with the sidebar is you must set it to no sidebar, and use 1/3 or 1/4 with a widget area, you can verify this by deleting the 404 file in the child theme and if there are any changes then it has something do to with it.
Best regards,
NikkoJune 8, 2017 at 1:14 pm #805557Thank you Nikko for your great help. ok so the error do not come from the code. is this for sure?
and for the sidebar. here it works perfect with ALB and sidebar left. http://www.lowcarbx.com/mitgliederbereich/ (it is a normal page). and this is also a normal page an it do not work: http://www.lowcarbx.com/mitgliederbereich/alex-pley-mitgliederbereich/ why does it NOT work here? i do not see the difference between this two pages?
Greetings, and thank you for your help, all the best, alexander
June 9, 2017 at 5:01 am #805824Hi,
The difference between the two pages you posted is one uses Default on Sidebar Settings while the other one uses Left Sidebar.
Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.