-if ( current_user_can( $post_type_object->cap->create_posts ) )
- echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
-if ( ! empty( $_REQUEST['s'] ) )
- printf( ' <span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() );
-?></h2>
+?></h1>
+
+<?php
+if ( current_user_can( $post_type_object->cap->create_posts ) ) {
+ echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
+}
+
+if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
+ /* translators: %s: search keywords */
+ printf( ' <span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', get_search_query() );
+}
+?>
+
+<hr class="wp-header-end">