Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Page & Category Menu Bars »

Add Search Box to Page Menu


  #1  
Old Mar 27, 2009, 11:41 AM
vinniev
 
22 posts · Mar 2009
Hey Flynn, thanks for all the work you've put into this theme! Just registered today and I'll be donating shortly.

My first question has to do with adding the Search box within the Page Menu bar. How hard is that to do?

It would look similar to the designs below


2nd question: I like the layout and look of the Page Menu Bars shown above. If I were to purchase them how replace the existing Page Menu Bars with the new design?

Thanks in advance....vinnie

Last edited by vinniev; Mar 27, 2009 at 11:47 AM.
  #2  
Old Mar 27, 2009, 08:02 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
For the search box you'd have to edit bfa_header_config.php

Integrating those menus is possible but requires edits in various files, it is not a quick job
  #3  
Old Apr 1, 2009, 06:36 PM
vinniev
 
22 posts · Mar 2009
Hi Flynn, I'm a little confused. Are you saying that I should edit the bfa_header_config.php in order to allow me to add the search box to the page bar?
  #4  
Old Apr 2, 2009, 06:12 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Yes, to include the search box into the menu bar, you'd have to edit bfa_header_config.php, plus add various CSS styles to make the search box align properly in all browsers. It would probably be easier to include a whole new menu bar, but if that menu bar is supposed to have a search box included, it would again be rather complex. This would easily take me 2-3 hrs

If you want include your own menu bar (one without search box), look for one that does not require any extra code such as <LI><span>Link</span></LI>

You'd need a menu that works with a plain standard unordered list

HTML Code:
<ul>
<li>...</li>
<li>...</li>
</ul>
Not all menus work like this. You'd have to look if "standard HTML UL list" is mentioned somewhere.

You'd have to include the CSS for the new menu either by including it as a separate file in header.php

PHP Code:
<link rel="stylesheet" href="<?php echo get_bloginfo('template_directory'); ?>/CSS-FOR-NEW-MENU.css" type="text/css" />
or by adding all the CSS as HTML/CSS Inserts -> CSS Inserts

Then you'd add the menu PHP code to header.php

PHP Code:
        <!-- Header -->
        <td id="header" colspan="<?php echo $cols?>">
YOUR MENU CODE HERE (above the header)      
        <?php bfa_header_config($bfa_ata['configure_header']); ?>
OR: YOUR MENU CODE HERE (below the header)
        </td>
        <!-- / Header -->
Your menu code would similar to this:

PHP Code:
<ul id="mynewmenu">
<?php wp_list_pages('title_li='); ?>
</ul>
So you'd end up with, i.e.:

PHP Code:
        <!-- Header -->
        <td id="header" colspan="<?php echo $cols?>">

        <?php bfa_header_config($bfa_ata['configure_header']); ?>

<ul id="mynewmenu">
<?php wp_list_pages('title_li='); ?>
</ul>

        </td>
        <!-- / Header -->
Then you'd turn off the Atahualpa menu bar at A. Theme Options -> Header -> Configure Header Area
  #5  
Old May 14, 2009, 12:55 PM
rockoboy
 
1 posts · May 2009
Hello I am having a problem integrating the search box in the navigation menu.
I edited my bfa_header_congfig.php file and cannot get it to work.
The search box displays above and not within the navigation box and it is the whole width of the browser.
Have been pulling my hair out for 3 days.
This is what I have, any suggestions are welcome:

// Page Menu Bar
$page_menu_bar =
'<div id="menu1"><ul id="rmenu2" class="clearfix rMenu-hor rMenu">' . "\n";
if ($bfa_ata['home_page_menu_bar'] != '') {
$page_menu_bar .= '<li class="page_item';
if (function_exists('is_front_page')) {
if (is_front_page() OR is_home()) {
$page_menu_bar .= ' current_page_item';
}
} elseif (is_home()) {
$page_menu_bar .= ' current_page_item';
}
$page_menu_bar .= '"><a href="' . get_option('home') . '/" title="' . get_option('blogname') . '">' .
$bfa_ata['home_page_menu_bar'] . '</a></li>' . "\n";
}
if ($bfa_ata['levels_page_menu_bar'] == "") {
$bfa_ata['levels_page_menu_bar'] = 0;
}
$page_menu_bar .= bfa_hor_pages($bfa_ata['sorting_page_menu_bar'], $bfa_ata['levels_page_menu_bar'],
$bfa_ata['titles_page_menu_bar'], $bfa_ata['exclude_page_menu_bar']);
$page_menu_bar .= '</ul></div>' . "\n"; ' <div><ul class="searchform">' .
include (TEMPLATEPATH . '/searchform.php');'</ul></div>' . "\n";
// END of Page Menu Bar
  #6  
Old May 15, 2009, 12:45 PM
shuag
 
3 posts · May 2009
I was wondering the same thing. I wouldn't even mind if it wasn't in the header.

What I mean is having the page menu be smaller in width. This would allow for the search box to be put in on the right side without actually being inside of the page menu itself. This would allow the page menu and the search box to be on the same line. But still remain seperate.

I have looked around and can't seem to find out where the page menu width is located. I'm pretty sure it is in some php file somewhere though. Or maybe someone has a css insert that will work to make it even easier.

I don't think I want to try and put it inside of the page menu yet though. From what Flynn says it sounds pretty code intensive and I don't think I am a good 'coder' .. . .. . . yet.
  #7  
Old May 19, 2010, 01:06 AM
SupraTT's Avatar
SupraTT
 
78 posts · May 2009
I been trying to do the same thing using the following code:

Code:
	// Close table if centered
	if ( strpos($header_items,"%page-center") !== FALSE ) {
		$page_menu_bar .= '</ul></td></tr></table></div>' . "\n";
	} else {
		$page_menu_bar .= '<li style="float: right; margin: 5px 5px; width: 200px;">'.include (TEMPLATEPATH . '/searchform.php');'</li></ul></div>' . "\n";
	}
However, the search bar appears on top of the page and takes up the whole width. It appears tables/forms cannot be contained inside a list. Anyone have a suggestion?

I actually modified the searchform.php template to the following:

Code:
<form method="get" class="searchform" action="<?php bloginfo('url'); ?>/">

<input type="text" class="searchfield" value="<?php the_search_query(); ?>" name="s" />

</form>
and used the above bfa_header_config, but for some reason the .include (TEMPLATEPATH . '/searchform.php'); displays a "1" in the area where I want the search box to appear. Does anyone know why this is happening?

Thank you,

SupraTT

Last edited by SupraTT; May 19, 2010 at 04:02 AM. Reason: New info; my own debugging

Bookmarks

Tags
page menu, page menu bar, search box



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I add an icon to a page menu link in page menu bar? bcorrigan Page & Category Menu Bars 9 Apr 6, 2009 03:35 PM
changing the look of the search box pltrace Sidebars & Widgets 4 Mar 30, 2009 07:16 PM
search box and archive search box zizi Page & Category Menu Bars 2 Mar 28, 2009 12:31 PM
Search Box is Disappearing Whatsthatcat? Atahualpa 3 Wordpress theme 0 Mar 19, 2009 10:59 PM
Search box has no button soonguy Header configuration & styling 2 Feb 10, 2009 05:04 PM


All times are GMT -6. The time now is 12:42 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.