• In the sidebar-2.php file it has a section here:

    <div class=”sidebar-top group”>
    <p><?php _e(‘More’,’hueman’); ?></p>
    </div>

    I am aware that I can change this to say something else simply by changing where it says More.

    I would like to have the search box in this area with the color in the background instead of text. Does anyone know how to do this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi ssneumann.

    1. Copy sidebar-2.php to your child theme.

    2. Find this:

    <?php if ( ot_get_option('sidebar-top') != 'off' ): ?>
    <div class="sidebar-top group">
    	<p><?php _e('More','hueman'); ?></p>
    </div>
    <?php endif; ?>

    3. Add the search code:

    <?php if ( ot_get_option('sidebar-top') != 'off' ): ?>
    <div class="sidebar-top group">
    	<p><?php _e('More','hueman'); ?></p>
    </div>
    
    <div class="toggle-search">
    	<i class="fa fa-search"></i>
    </div>
    <div class="search-expand">
    	<div class="search-expand-inner">
    		<?php get_search_form(); ?>
    	</div>
    </div>
    
    <?php endif; ?>

    4. Then add this to your child theme css:

    /* position sidebar search */
    .s2 .toggle-search {
        top: 5px;
    }
    .s2 .search-expand {
        top: 55px;
    }
    Thread Starter ssneumann

    (@ssneumann)

    Thanks! I was able to modify that to work. One more question…

    The other column I would like to replace the “Follow” and social media with an image the same size. Is there a way to do that and still have the side collapse on mobile? Once I get this page live this weekend I will post a link here so you can see what I’ve done with it… I’ve just found those 2 colored boxes a misuse of prime web space…

    1. Copy sidebar.php to your child theme.

    2. Replace this:

    <div class="sidebar-top group">
    	<p><?php _e('Follow:','hueman'); ?></p>
    	<?php alx_social_links() ; ?>
    </div>

    with your image:

    <div class="sidebar-top group">
    	<img src="http://path-to-your-image.jpg" alt="">
    </div>

    3. Add this css:

    .s1 .sidebar-top {
      padding: 0 !important;
    }
    .s1 .sidebar-top img {
      margin-bottom: -6px;
      height: 60px;
    }

    I tested it using a 1200×200 image and it automatically scaled to fit. There was a slight gap below the image which I fixed using the css above.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Add Search function to MORE box’ is closed to new replies.