Support » Theme: Serene » 404 error page

  • Resolved massacre



    I have two search fields on 404 error page. I’ve check another blog, based on this theme and it’s the same. Any ideas how to edit to code in order to have only one field?

    Here is the code for no-results.php

     * @package Serene
     * @since Serene 1.0
    <div class="entry no-results-found">
    	<h1><?php esc_html_e( 'Hmm. Weird! Nothing found. Maybe serch again?', 'Serene' ); ?></h1>
    <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
    	<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'Serene' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
    <?php elseif ( is_search() ) : ?>
    	<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'Serene' ); ?></p>
    	<?php get_search_form(); ?> 
    <?php else : ?>
    <!--	<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'Serene' ); ?></p>
    	<?php get_search_form(); ?> -->
    <?php endif; ?>
Viewing 5 replies - 1 through 5 (of 5 total)
  • You have already placed HTML comments tag <!-- --> around it so it shouldn’t display in the browser. Can you share your website’s URL.

    I found the problem by using this theme in a local installation.

    The 2nd search box you are seeing is the one displayed by the <a href="">get_sidebar()</a> function.

    When this function is called without any parameters it searches for the sidebar.php file but this theme doesn’t have one so from the codex

    If the theme contains no sidebar.php file then the sidebar from the default theme wp-includes/theme-compat/sidebar.php will be included.

    The solution here is to create an empty file named sidebar.php in


    this causes wordpress to display your widgets.

    Thank you very much, jesin!

    You’re welcome, if the solution works can you mark this thread as resolved so that others having the same issue will find it useful.

    Yes, of course! I forgot about it, thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘404 error page’ is closed to new replies.