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 » Plugins & Atahualpa »

Problem to show a category in the Search Box of the header


  #1  
Old Oct 21, 2009, 05:58 AM
iosphiel
 
4 posts · Oct 2009
Hi, i have a problem to show the category in the category page in the header. I need "Buscar + category" but the category appears out of the search box.

How can i fix it?

Thanks.


Code:
		// Search box
		if ( $bfa_ata['show_search_box'] == "Yes" ) { 
				
		if ( is_category() ){
		
			$logo_area .= '<td valign="bottom" class="search-box" align="right">';
			$logo_area .= '<div style="width:150px;margin: 0 140px 0 0;"><span style="color:#006699;font-weight: bold;">Buscar '; 		
			$logo_area .= single_cat_title('');
			$logo_area .= ' </span></div><div class="searchbox">	
			

			   <form method="get" class="searchform" action="' . get_bloginfo( 'url' ) . '/">
				<div class="searchbox-form">' .
					// Check for WP 2.2 which doesn't know get_search_query
					(function_exists('get_search_query') ? '
					<input type="text" class="text inputblur" onfocus="this.value=\''.
					(get_search_query() ? get_search_query() : '' ).'\'" 
					value="' . (get_search_query() ? get_search_query() : $bfa_ata['searchbox_text'] ) . 
					'" onblur="this.value=\''.(get_search_query() ? get_search_query() : $bfa_ata['searchbox_text'] ).
					'\'" name="s" />' :
					'<input type="text" class="text inputblur" name="s" />') .
				'</div>
				</form>
			</div>
			</td>';
  #2  
Old Oct 21, 2009, 09:07 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
What version of Ataualpa?
Where are you putting this code?
What is the url?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Oct 21, 2009, 09:35 AM
iosphiel
 
4 posts · Oct 2009
Sorry xD. The Version is Atahualpa 3.4.4, i am putting this code in the file theme/atahualpa/functions/bfa_header_config.php. The idea is customize the title of the search box for every category in every catergory page. The problem is: "category name" appears in other place.

http://blog.abserver.es/?cat=3

Thanks! ;-)
  #4  
Old Oct 21, 2009, 09:41 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
where exactly are yo putting it?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Oct 21, 2009, 09:58 AM
iosphiel
 
4 posts · Oct 2009
theme/atahualpa/functions/bfa_header_config.php

// Search box
if ( $bfa_ata['show_search_box'] == "Yes" ) {

if ( is_category() ){

$logo_area .= '<td valign="bottom" class="search-box" align="right">';
$logo_area .= '<div style="width:150px;margin: 0 140px 0 0;"><span style="color:#006699;font-weight: bold;">Buscar ';
$logo_area .= single_cat_title(''); "virus" <-- The name of category but appear in the top of the header of the page. I wish "Buscar Virus"

$logo_area .= ' </span></div><div class="searchbox">


<form method="get" class="searchform" action="' . get_bloginfo( 'url' ) . '/">
<div class="searchbox-form">' .
// Check for WP 2.2 which doesn't know get_search_query
(function_exists('get_search_query') ? '
<input type="text" class="text inputblur" onfocus="this.value=\''.
(get_search_query() ? get_search_query() : '' ).'\'"
value="' . (get_search_query() ? get_search_query() : $bfa_ata['searchbox_text'] ) .
'" onblur="this.value=\''.(get_search_query() ? get_search_query() : $bfa_ata['searchbox_text'] ).
'\'" name="s" />' :
'<input type="text" class="text inputblur" name="s" />') .
'</div>
</form>
</div>
</td>';



$logo_area .= '</tr></table>';

} else {


$logo_area .= '<td valign="bottom" class="search-box" align="right">';
$logo_area .= '<div style="width:50px;margin: 0 140px 0 0;"><span style="color:#006699;font-weight: bold;">Buscador</span></div><div class="searchbox">

<form method="get" class="searchform" action="' . get_bloginfo( 'url' ) . '/">
<div class="searchbox-form">' .
// Check for WP 2.2 which doesn't know get_search_query
(function_exists('get_search_query') ? '
<input type="text" class="text inputblur" onfocus="this.value=\''.
(get_search_query() ? get_search_query() : '' ).'\'"
value="' . (get_search_query() ? get_search_query() : $bfa_ata['searchbox_text'] ) .
'" onblur="this.value=\''.(get_search_query() ? get_search_query() : $bfa_ata['searchbox_text'] ).
'\'" name="s" />' :
'<input type="text" class="text inputblur" name="s" />') .
'</div>
</form>
</div>
</td>';

$logo_area .= '</tr></table>';
  #6  
Old Oct 21, 2009, 12:16 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
In your code
HTML Code:
$logo_area .= single_cat_title(''); "virus"
the ';' is the end of the statement (loke a period at the end of a sentence) you want to add the 'virus' in the same command so try this
$logo_area .= single_cat_title('')." virus";
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Oct 22, 2009, 02:08 AM
iosphiel
 
4 posts · Oct 2009
Sorry, What I mean is:

When i click in a category





In the category page must be show:





But appear it:




My code is:


Code:
		// Search box
		if ( $bfa_ata['show_search_box'] == "Yes" ) { 
				
		if ( is_category() ){
		
			$logo_area .= '<td valign="bottom" class="search-box" align="right">';
			$logo_area .= '<div style="width:150px;margin: 0 140px 0 0;"><span style="color:#006699;font-weight: bold;">Buscar '; 		
			$logo_area .= single_cat_title('');

                       // single_cat_title('')  <-- Show the category name




Thanks.
  #8  
Old Oct 22, 2009, 06:22 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
why not just name the category 'Buscar Virus'?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding a submit button to the header search box eyelight Header configuration & styling 2 Aug 2, 2010 07:16 AM
Spacing in the header - Search box is too far to the right austin2k Header configuration & styling 1 Aug 31, 2009 04:23 PM
Google Adsense Search Box in Header jendico Header configuration & styling 2 Jul 21, 2009 12:11 PM
removing tagline from 'search box' area of header kiddio Header configuration & styling 1 May 28, 2009 06:02 PM
search box and archive search box zizi Page & Category Menu Bars 2 Mar 28, 2009 12:31 PM


All times are GMT -6. The time now is 07:19 PM.


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