search bar in man menu wordpress
Topics related to RedWaves lite theme goes here.

Alex

New Member Rank
Posts: 9
Joined: Fri Feb 26, 2016 12:12 pm
Display Name: Alex

search bar in man menu wordpress

linkPost by SaSaj » Fri Feb 26, 2016 12:21 pm

Hi, everybody! How to add search box in the website to the main menu of a theme?
User avatar
Asmi Khalil

Site Admin Rank
Posts: 781
Joined: Fri Jun 26, 2015 7:13 am
Display Name: Asmi Khalil
Location: Tunisia

Re: search bar in man menu wordpress

linkPost by admin » Fri Feb 26, 2016 9:47 pm

Hi Alex, thanks for coming here :D
If you follow this guide, you will get the following result:
Image

First, open header.php and change:
						<nav id="site-navigation" class="main-navigation" role="navigation">
							<?php if ( has_nav_menu( 'primary' ) ) {
								wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'menu' ) ); 
							}else{ ?>
								<div class="no-menu-msg"><?php _e('Please assign a menu (Go to Appearance => Menus and assign a menu to "Primary Menu" location)', 'redwaves-lite') ?></div>
							<?php } ?>
						</nav><!-- #site-navigation -->
To:
						<nav id="site-navigation" class="main-navigation" role="navigation">
							<?php if ( has_nav_menu( 'primary' ) ) {
								wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'menu' ) ); 
							}else{ ?>
								<div class="no-menu-msg"><?php _e('Please assign a menu (Go to Appearance => Menus and assign a menu to "Primary Menu" location)', 'redwaves-lite') ?></div>
							<?php } ?>
							<div class="search-bar-nav">
								<form role="search" method="get" class="search-form" action="<?php echo home_url( '/' ); ?>">
									<div>
									<span class="screen-reader-text"><?php esc_attr_e( 'Search for', 'redwaves-lite' ); ?></span>
									<input type="search" class="search-field" placeholder="<?php esc_attr_e( 'Search &#8230;', 'redwaves-lite' ); ?>" value="" name="s" title="<?php esc_attr_e( 'Search for:', 'redwaves-lite' ); ?>">
								 </div>
								</form>
							</div>

						</nav><!-- #site-navigation -->
Then, add the following CSS rules to style.css file or Custom CSS option (Appearance => Customize => Design & Layout):
.search-bar-nav {
	float: right;
	display: inline-block;
	height: 56px;
	padding: 8px 0;
}
.search-bar-nav input {
	background-color: rgba(0, 0, 0, 0.32);
	border: 0;
	padding: 0 10px;
	border-radius: 4px;
	height: 40px;
	color: #FFF;
}
Easy right?!
I think there is a world market for maybe five computers. - IBM chairman Thomas Watson, 1943
Alex

New Member Rank
Posts: 9
Joined: Fri Feb 26, 2016 12:12 pm
Display Name: Alex

Re: search bar in man menu wordpress

linkPost by SaSaj » Sat Feb 27, 2016 9:38 am

Yes, really it is very simple - thanks you huge for the help, prompt still such trick - how to deduce the list of headings in a heading. For example - at pushing a heading the list of headings by an example opens as display of the list of records at pushing a heading is implemented. When I put the list of headings child - all records which are in these headings open, and it would be necessary that the list of headings. The plug-in such can is?
User avatar
Asmi Khalil

Site Admin Rank
Posts: 781
Joined: Fri Jun 26, 2015 7:13 am
Display Name: Asmi Khalil
Location: Tunisia

Re: search bar in man menu wordpress

linkPost by admin » Sat Feb 27, 2016 1:15 pm

I couldn't understand a word from your last post! Please explain your idea with an image if possible.
I think there is a world market for maybe five computers. - IBM chairman Thomas Watson, 1943
Alex

New Member Rank
Posts: 9
Joined: Fri Feb 26, 2016 12:12 pm
Display Name: Alex

Re: search bar in man menu wordpress

linkPost by SaSaj » Sat Feb 27, 2016 2:30 pm

Ок. I simply not so well know English)))
need:
Category main- clik:
Category1
Category2
Category3
With pictures

And now is:
Category:
record1
rercord2
record3
User avatar
Asmi Khalil

Site Admin Rank
Posts: 781
Joined: Fri Jun 26, 2015 7:13 am
Display Name: Asmi Khalil
Location: Tunisia

Re: search bar in man menu wordpress

linkPost by admin » Sun Feb 28, 2016 1:55 am

Still don't understand :(
What is Category and what is Record? Are you talking about the breadcrumbs?
Could you create a simple image using Paint or any photo editor to demonstrate what are you trying to achieve?
I think there is a world market for maybe five computers. - IBM chairman Thomas Watson, 1943
Alex

New Member Rank
Posts: 9
Joined: Fri Feb 26, 2016 12:12 pm
Display Name: Alex

Re: search bar in man menu wordpress

linkPost by SaSaj » Sun Feb 28, 2016 8:29 am

I have tried to draw all
Attachments
рубрика 2.JPG
category
рубрика 2.JPG (60.87 KiB) Viewed 3368 times
need.png
need.png (115.2 KiB) Viewed 3368 times
menu.png
menu.png (6.88 KiB) Viewed 3368 times

Who is online

Users browsing this forum: No registered users and 1 guest

It is currently Fri Aug 23, 2019 8:34 pm