WordPress.org

Ready to get started?Download WordPress

Forums

How to put a banner in heather instead of the search box? (17 posts)

  1. Ariel2
    Member
    Posted 1 year ago #

    Hello, I'm new at using WordPress, I'm using the Twenty Eleven theme, and have made a child theme, what I want to do is removing the search box and in that place to put a banner

    I need an step by step, thanks

  2. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    Review CSS, this forum does not provide step by step for such.

  3. Ariel2
    Member
    Posted 1 year ago #

    Well I think this could involve more than css, I thought maybe php...but I don't know, but I think this forum is also for step by step, really I didn't understand why you said that

  4. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    new at using WordPress

    Social Engineering was discovered with AT&T in the 70's...please help us more....

  5. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    edit header.php;
    locate the code of the searchbar:

    <?php
    				// Has the text been hidden?
    				if ( 'blank' == get_header_textcolor() ) :
    			?>
    				<div class="only-search<?php if ( $header_image ) : ?> with-image<?php endif; ?>">
    				<?php get_search_form(); ?>
    				</div>
    			<?php
    				else :
    			?>
    				<?php get_search_form(); ?>
    			<?php endif; ?>

    replace it with the banner code.

  6. Ariel2
    Member
    Posted 1 year ago #

    alchymyth, I tested that with a 468x60 banner size and It appeared so big, covering the full width of the heather

    But I'd like to know if It is possible to set up a widget area in the heather in order to I could add the banner code from the dashborad, and give styles to that container

  7. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    set up a widget area in the heather

    general, see: http://codex.wordpress.org/Widgetizing_Themes
    for more details, read for example: http://www.transformationpowertools.com/wordpress/add-custom-widget-area-wordpress

  8. Ariel2
    Member
    Posted 1 year ago #

    alchymyth I have a doubt with this part you have in your site:

    - this goes into the template at the location where you want the custom widget to appear:

    <?php if ( is_active_sidebar( 'custom-widgets' ) ) : ?>
    <div class="custom">

      <?php if ( !dynamic_sidebar( 'custom-widgets' ) ) : ?>
      <?php endif; ?>

    </div>
    <?php endif; ?>

    The doubt is, where exactly this goes, in some child theme archive? or which archive of the parent? I really have no idea

  9. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    where exactly this goes

    in your case, for instance into header.php - to replace the 'searchbar' code section.

  10. Ariel2
    Member
    Posted 1 year ago #

    alchymyth and the other code that goes in funtions.php should I make first a copy of functions.php into the child theme and work there?

    And this could go in any part of the functions.php?

  11. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    create a new (empty) functions.php in the child theme; http://codex.wordpress.org/Child_Themes#Using_functions.php

    add this into the first line:

    <?php

    make sure there are no empty lines or space characters before that.

    then add the suggested function code into functions.php

  12. Ariel2
    Member
    Posted 1 year ago #

    alchymyth, must I add any final ending like " ?>" to the end of the code?

  13. todayheads
    Member
    Posted 1 year ago #

    contact your theme developer he shall lead you the way, and if not as the sweeper said you have to edit your header.php file don't forget to backup your site before performing live edits

  14. Ariel2
    Member
    Posted 1 year ago #

    alchymyth: your help was great! I'm very greateful! and your web is very useful, thank you very much

  15. Ariel2
    Member
    Posted 1 year ago #

    contact your theme developer he shall lead you the way, and if not as the sweeper said you have to edit your header.php file don't forget to backup your site before performing live edits

    Thanks for you comment, and yes, he did, I'm very greatful

  16. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    must I add any final ending like " ?>" to the end of the code?

    no;
    you can add this to the end, and if you do, there must be no other empty lines or space characteres after that.

  17. Ariel2
    Member
    Posted 1 year ago #

    ah ok alchymyth, thank you !

    Best regards

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.