Search Bar In Header

Ask questions about FlatPress themes, present your themes, request new themes.
Post Reply
User avatar
WineMan
Posts: 106
Joined: Tue Sep 01, 2020 5:03 pm

Search Bar In Header

Post by WineMan » Thu May 12, 2022 4:02 pm

I am using made's version of the Leggero theme and wondered how I could move the Search bar from the right panel to the header. If so, how is it done?

User avatar
Madekozu
Posts: 45
Joined: Thu Apr 21, 2022 8:41 am
Location: Hemmingen (Germany, BaWü)
Contact:

Re: Search Bar In Header

Post by Madekozu » Thu May 12, 2022 4:16 pm

Unfortunately, the Leggero V2 only has the right bar for widgets. My "version" is just a style for the Leggero.

To get a search field in the header, you would have to add it to the template /fp-interface/themes/leggero/header.tpl. I haven't tried it myself yet and I'm sure you'll have to adjust it a bit (div id etc), but something like this has to go in there:

Code: Select all

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="{$fp_config.locale.lang}">
<head>
	<title>{$flatpress.title|tag:wp_title:'&laquo;'}</title>
	<meta http-equiv="Content-Type" content="text/html; charset={$flatpress.charset}" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' rel='stylesheet' type='text/css'/>

	{action hook=wp_head}
</head>

<body>
	<div id="body-container">

		<div id="head">
						<div class ="alignright" id="widget-searchbox">
			
		<form method="get" action="/search.php">
		<input type="hidden" name="stype" value="full"><p><input type="text" name="q"></p>		
		</form>
		
			</div>
			
			<h1><a href="{$smarty.const.BLOG_BASEURL}">{$flatpress.title}</a></h1>
			<p class="subtitle">{$flatpress.subtitle}</p>
			
		</div> <!-- end of #head -->
		

	
	<div id="outer-container">
Bäume spenden Schatten und Kettensägen Licht!

User avatar
WineMan
Posts: 106
Joined: Tue Sep 01, 2020 5:03 pm

Re: Search Bar In Header

Post by WineMan » Thu May 12, 2022 4:42 pm

Thanks...I will play around with it to see if I can get it to look the way I want.

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests