Support » Fixing WordPress » Styling custom search page – can't get the same layout

  • Hey everyone.
    I’m creating an portfolio for a course on my university, and I decided I wanted to add an searchbar in the footer of the site.
    The site url is
    The theme im using is called Minimal Dessign.
    As you can see, the searchbar in the footer is functional, but the search-function itself isn’t really working.
    There are several problems:
    – When I search for something (like Changelog) it generally only finds one post, even though there are several others (I’ve added tags and they have the same title, different version number, see the page ChangeLog for more info.)
    – When I search for something and the searchbar DOES find something, I don’t know where to add my right_content (the small images on the right, as seen on every other page)
    – When it DOESN’T find anything, I can add the right_content, but I can’t add border, background etc. for this page.

    How do I make them look alike, and what should I add in the style.css file to make the background and border appear on both sites?


    <form method=”get” class=”searchform” action=”<?php echo home_url(); ?>” >
    <input type=”text” value=”” name=”s” class=”s” />
    <input type=”submit” class=”searchsubmit” value=”Search” />

    Search.php (copied from the TwentyTen theme)

    * The template for displaying Search Results pages.
    * @package WordPress
    * @subpackage Twenty_Ten
    * @since Twenty Ten 1.0
    get_header(); ?>

    <div id=”container”>
    <div id=”content” role=”main”>

    <?php if ( have_posts() ) : ?>
    <h1 class=”page-title”><?php printf( __( ‘Search Results for: %s’, ‘minimal dessign’ ), ‘<span>’ . get_search_query() . ‘</span>’ ); ?></h1>
    /* Run the loop for the search to output the results.
    * If you want to overload this in a child theme then include a file
    * called loop-search.php and that will be used instead.
    get_template_part( ‘loop’, ‘search’ );
    <?php else : ?>
    <div id=”post-0″ class=”post no-results not-found”>

    <h2 class=”entry-title”><?php _e( ‘Nothing Found’, ‘minimal dessign’ ); ?></h2>
    <div class=”entry-content”>
    <p><?php _e( ‘Sorry, but nothing matched your search criteria. Please try again with some different keywords.’, ‘minimal dessign’ ); ?></p>



    <?php get_search_form(); ?>

    </div><!– .entry-content –>
    </div><!– #post-0 –>

    <?php endif; ?>

    </div><!– #content –>

    <div class=”right_container”>
    <div class=”right_sidebar”>

    global $post;
    $myposts = get_posts(‘numberposts=20&category_name=Featured Small’);
    foreach($myposts as $post) :

    if ( has_post_thumbnail() ) {
    ?> “><?php the_post_thumbnail(‘featured-small’); ?> <?php
    } else {
    ?> “><img src=”<?php echo catch_that_image() ?>” width=”172″ height=”104″ /> <?php

    <?php endforeach; ?>


    </div><!– #container –>

    Edit: Oh, I’ve also added the loop.php, loop-page.php, loop-attachment.php and the loop-single.php page from the TwentyTen theme (not sure if they’re used for anything, but it seems like they are, so I just copied them.)

    Would really appreciate the help.

  • The topic ‘Styling custom search page – can't get the same layout’ is closed to new replies.