WordPress.org

Support

Support » Themes and Templates » Search Keywords & Fix Side Bar

Search Keywords & Fix Side Bar

  • mariusveq

    @mariusveq

    Hello,

    I have two enigmas for you guys:

    1. I have a very simple theme for my blog, and I want the search button to give me results not only from the titles but also from the keywords that I introduce for every post. This is what I have in search.php:

    <?php get_header(); ?>
    <div id="post-area">
       	  	  <div id="post-<?php the_ID(); ?>" class="page type-post">
                                <div class="stumblr-title"><h1>Search Results</h1></div>
                  <div class="stumblr-content">
               		 <?php if (have_posts()) : ?>
                     <ul>
                            <?php while (have_posts()) : the_post(); ?>
                       <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
                            <?php endwhile; ?>
                     </ul>
                        <?php else : ?>
                                <p>No Results</p>
                        <?php endif; ?>
                  </div>
         <div class="clear"></div></div><!-- end page -->
    </div>
    <?php get_footer(); ?>

    2. I have a sidebar and the loop page, the page with the posts. On the sidebar I have only the logo of the blog and under it the search box. What I need is to fix this two, so when I scroll the only things that moves is the posts page. This is from the style.css:

    /* sidebar styles */
      #stumblr-sidebar     { width:200px; display:inline; float:right; margin-top:80px; }
      #logo 			 { margin-bottom:10px; width:200px; overflow:hidden; }

    This is from the header.php

    <div id="wrap">
    	<div id="stumblr-sidebar">
    
        	<div id="logo">
            	<a href="<?php echo home_url( '/' ); ?>"  title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    				<?php if ($stumblr_logo != '') {?><img src="<?php echo $stumblr_logo; ?>" alt="<?php bloginfo('sitename'); ?>"><?php } else { ?><img src="<?php echo get_template_directory_uri(); ?>/images/light/logo.png" alt="<?php bloginfo('sitename'); ?>" width="200"><?php } ?>
               </a>
           </div>
    
    <?php if ( is_active_sidebar( 'stumblr_widgets')) { ?>
    <div id="sidebar-widget-area">
    <?php dynamic_sidebar( 'stumblr_widgets' ); ?>
    </div>
    <?php }  ?>
    </div><!-- // stumblr-sidebar -->

    Any idea on what can I introduce so I manage the two problems?

    Thanks in advance,
    M.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Search Keywords & Fix Side Bar’ is closed to new replies.
Skip to toolbar