WordPress.org

Ready to get started?Download WordPress

Forums

PLEASE HELP (2 posts)

  1. schememag
    Member
    Posted 2 years ago #

    Hi,
    I want to place my searchbox on my header at the side like this.. http://www.freshngood.com/

    i dont know much about coding so please help it will be much appreciated! :)

    heres my blog http://schememagazine.com/

    [ http://codex.wordpress.org/Forum_Welcome#Choose_A_Good_Topic_Title ]

  2. vtxyzzy
    Member
    Posted 2 years ago #

    You should create a Child theme to make your changes. If you do not, all of your changes will be lost if you update your theme.

    Add this to your functions.php to register a new sidebar for the top of the page:

    register_sidebar(array(
      'name' => __( 'Page Top Sidebar' ),
      'id' => 'page-top-sidebar',
      'description' => __( 'Widgets in this area will be shown at the top of the page.' ),
      'before_title' => '<h1>',
      'after_title' => '</h1>'
    ));

    Add this to the end of style.css to style the sidebar:

    #page-top-sidebar {
        float: right;
    }
    #page-top-sidebar ul li h1 { display: none; }
    #page-top-sidebar li { list-style: outside none; }

    Modify header.php by changing this:

    <div id="wrapperpub" class="container">
    	<div id="header">
    		<div class="sixteen columns">
    			<h1 id="blog-title" class="blogtitle"><a href="<?php echo home_url( '/' ); ?>" title="<?php bloginfo('name') ?>"><?php bloginfo('name') ?></a></h1>

    to this:

    <div id="wrapperpub" class="container">
    	<div id="header">
    		<div class="sixteen columns">
    			<div id="page-top-sidebar"><ul>
    			   <?php dynamic_sidebar('page-top-sidebar'); ?>
    			</ul></div><!-- #page-top-sidebar -->
    			<h1 id="blog-title" class="blogtitle"><a href="<?php echo home_url( '/' ); ?>" title="<?php bloginfo('name') ?>"><?php bloginfo('name') ?></a></h1>

Topic Closed

This topic has been closed to new replies.

About this Topic