Making WordPress.org

Changeset 4242


Ignore:
Timestamp:
10/14/2016 09:29:29 PM (8 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Add search form to 404 pages.

Props keesiemeijer.
Fixes #2089.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php

    r3840 r4242  
    13231323        $taxonomies = array( 'wp-parser-since', 'wp-parser-package', 'wp-parser-source-file' );
    13241324
    1325         return ! is_search() && ( is_singular( $post_types ) || is_post_type_archive( $post_types ) || is_tax( $taxonomies ) || get_query_var( 'is_handbook' ) );
     1325        return ! ( is_search() || is_404() ) && ( is_singular( $post_types ) || is_post_type_archive( $post_types ) || is_tax( $taxonomies ) || get_query_var( 'is_handbook' ) );
    13261326    }
    13271327
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss

    r3853 r4242  
    524524    }
    525525
     526    section.error-404 {
     527        overflow: visible;
     528    }
    526529    .home-landing .section {
    527530        padding: 30px 0%;
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/searchform.php

    r3281 r4242  
    66 */
    77?>
    8 <div class="search-section section clear <?php if ( ! ( is_page( 'reference' ) || is_search() ) ) { echo 'hide-if-js'; } ?>">
     8<div class="search-section section clear <?php if ( ! ( is_page( 'reference' ) || is_search() || is_404() ) ) { echo 'hide-if-js'; } ?>">
    99
    1010<?php if ( is_search() ) { ?>
     
    3838        $search_url  = get_query_var( 'current_handbook_home_url' );
    3939        $search_url  = $search_url ? $search_url : home_url( '/' );
    40         $form_class  = $is_handbook ? ' searchform-handbook' : '';
     40        $filters     = ! ( $is_handbook || is_404() );
     41        $form_class  = ( $filters ) ? ' searchform-filtered' : '';
     42        if ( $is_handbook ) {
     43            $form_class .= ' searchform-handbook';
     44        }
    4145    ?>
    4246
     
    5054        </div>
    5155
    52     <?php if ( ! $is_handbook ) : ?>
     56    <?php if ( $filters ) : ?>
    5357
    5458        <div class="search-post-type">
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css

    r3853 r4242  
    865865}
    866866
     867.devhub-wrap section.error-404 {
     868  overflow: visible;
     869}
     870
    867871.devhub-wrap .home-landing .section {
    868872  padding: 30px 0%;
Note: See TracChangeset for help on using the changeset viewer.