Header Search Field and widgets

Discussion in 'ColorWay WordPress Theme' started by stevehale, Sep 24, 2014.

  1. stevehale

    stevehale New Member

    Joined:
    Aug 2, 2014
    Messages:
    10
    Likes Received:
    0
    In many WP themes it is possible to put widgets, such as Search field, WP Translate option and so on into the header.

    This cannot seem to be done in Colorway, I have the latest version.

    How can this be achieved please.

    Currently this seems to be a shortcoming in the theme, not allowing this flexibility.

    Regards

    Steve B
     
  2. Pramod

    Pramod Guest

    Joined:
    Aug 8, 2014
    Messages:
    2,847
    Likes Received:
    63
    Hello,
    You can do it from your dashboard widget section.
    Thanks & Regards
    Pramod
     
  3. stevehale

    stevehale New Member

    Joined:
    Aug 2, 2014
    Messages:
    10
    Likes Received:
    0
    Hi Pramod

    In the Widget section there is a Search widget BUT this cannot be put on the front page, this is where I want the search to appear. On the front page in the header, top right.

    Unless I am missing something......

    Can you advise please

    Thanks

    Steve B
     
  4. Pramod

    Pramod Guest

    Joined:
    Aug 8, 2014
    Messages:
    2,847
    Likes Received:
    63
    Hello,
    Please provide a screenshot of the section where you want to add search field as well as the URL of your website. We will definitely help you if possible.
    Thanks & Regards
    Pramod
     
  5. stevehale

    stevehale New Member

    Joined:
    Aug 2, 2014
    Messages:
    10
    Likes Received:
    0
    Hi Pramod

    The URL is: http://81.27.85.13/~dorches/ (site under development at the moment)

    Image of where to put desired search field is attached. You can see where I ideally want to put it. Also the Crest on the right side of the header is on the right of the header "logo" (logo is 1150 pixels wide) and ideally I would like to have this as a separate image widget as well.

    Like this header on this other site I am developing:-

    http://81.27.85.13/~hipandk

    Also attached is a screen dump of the Dashboard Widget section of the other site and you can see that the header can have widgets placed in it. See the second image I attach. I know that the theme is different (Vantage) but I would have thought your theme would have this flexibility?

    Regards

    Steve B
     

    Attached Files:

  6. Pramod

    Pramod Guest

    Joined:
    Aug 8, 2014
    Messages:
    2,847
    Likes Received:
    63
    Hello,
    It requires lots of customization .Currently you are using a full width image in header section. You can use only one thing either image or widget.
    Thanks & Regards
    Pramod
     
  7. stevehale

    stevehale New Member

    Joined:
    Aug 2, 2014
    Messages:
    10
    Likes Received:
    0
    Pramod

    I am well aware that by using the full width image it leave no room for a widget. HOWEVER I cannot even place a widget in the header anyway, even if the full length image is removed.

    So finally can you please advise me if a search field can be put in the header or not, if I reduce the header image to only be on the left side.

    Regards

    Steve B
     
  8. Pramod

    Pramod Guest

    Joined:
    Aug 8, 2014
    Messages:
    2,847
    Likes Received:
    63
    Hello,
    You can add widget area in header section and use search bar in that widget area.
    You have to follow three steps to achieve this.
    Step-1:
    PHP:
    // Area header, located at the top of the sidebar.
    register_sidebar(array(
    'name' =>'Header Widget Area',
    'id' => 'header-widget-area',
    'description' =>'The header widget area',
    'before_widget' => '',
    'after_widget' => '',
    'before_title' => '<h2 class="widget-title">',
    'after_title' => '</h2>',
    ));
    Paste this code in functions.php (follow below image-3 for correct location where to paste.)

    Step-2:
    PHP:
    <div class="grid_24 header">
                    <div class="grid_16">
                    <div class="logo"><a href="<?php bloginfo('url'); ?>"><img src="<?php if (get_option('colorway_logo') != '') { ?><?php echo get_option('colorway_logo'); ?><?php } else { ?><?php bloginfo('template_url'); ?>/images/logo.png<?php ?>" alt="<?php bloginfo('name'); ?>" /></a> </div></div>
                        <div class="grid_4">
                <div class="call-us">
                <?php if (get_option('colorway_contact_number') != '') { ?>
                <a class="btn" href="tel:<?php echo stripslashes(get_option('colorway_contact_number')); ?>">
                </a>
                <?php }
                else { 
    ?>
                <?php ?>
                    </div>
                    <div class="grid_4 omega">         
                    <?php if (is_active_sidebar('header-widget-area')) : ?>
            <div class="header widget area">
                <?php dynamic_sidebar('header-widget-area'); ?>
                </div>
    <?php endif; ?>
    </div>
                    </div>
                    <div class="clear"></div>
    Paste this code in header.php (follow below image-4 for correct location where to paste.)
    Step-3:
    Appearance -> widgets ->(Set search widgets in Header Widget Area)
    Thanks & Regards
    Pramod
     

    Attached Files:

    • 3.png
      3.png
      File size:
      195.3 KB
      Views:
      9
    • 4.png
      4.png
      File size:
      200.2 KB
      Views:
      7
  9. thinkchip

    thinkchip New Member

    Joined:
    Dec 19, 2014
    Messages:
    13
    Likes Received:
    0

Share This Page