Jump to content


Photo

Show 'sub header' and 'subnavi' in Search and Tags pages


This topic has been archived. This means that you cannot reply to this topic.
10 replies to this topic

#1 vale1789

vale1789

    Member

  • Members
  • PipPip
  • 17 posts

Posted 25 April 2010 - 09:48 AM

Hi, How can I show the 'sub header', 'subnavi' in tags and search results? My site is http://www.ciceroo.com Thanks

#2 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 26 April 2010 - 04:58 PM

It appears as it is already showing up in the tag pages. To add it to the search page. You can edit the search.php file so it looks like this: ` `

#3 vale1789

vale1789

    Member

  • Members
  • PipPip
  • 17 posts

Posted 26 April 2010 - 08:29 PM

Hi I meant that I want to show the category menubar, the gray one (where I added in the _sub_head.php a second menubar, the red one) in the TAGS and the SEARCH pages. If you try to click on 'BLOGs' at http://www.ciceroo.com the category menubar (grey) still appears, BUT if you click on a TAG it will disappear together with the red one. ps: I have the EcoPRO pps: I tryed the code above in the search.php but I get no menubar or this: http://www.ciceroo.c...AAAAAAA&x=0&y=0 THanks

#4 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 26 April 2010 - 09:29 PM

Okay, undo the code I gave you. Try changing the first line of code in the sub_head.php file so it says this: ``

#5 vale1789

vale1789

    Member

  • Members
  • PipPip
  • 17 posts

Posted 26 April 2010 - 09:57 PM

I tried but still not working.

#6 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 26 April 2010 - 11:11 PM

Can you show me what the sub_head.php file looks like?

#7 vale1789

vale1789

    Member

  • Members
  • PipPip
  • 17 posts

Posted 26 April 2010 - 11:17 PM

Yes!

 
	
	<?php if(!pagelines('hide_sub_header')):?>
		<?php if($post->post_parent || wp_list_pages("title_li=&child_of=".$post->ID."&echo=0")) $children = true;?>
		<?php if($children):?>
			<div id="sub_head" class="fix">
				<div class="content">
					<?php require(THEME_LIB.'/_sub_nav.php');?>
				</div>
			</div>
		<?php elseif((is_home() || is_category()) && pagelines('subnav_categories') && wp_list_categories('include='.pagelines('subnav_categories').'&title_li=&echo=0') != "
	
	<li>No categories</li>
	"):?>
		<div id="sub_head" class="fix">
			<div class="content">
				<ul id="subnav" class="fix">
	
	<li><span class="subnav_first">? </span></li>
					<?php wp_list_categories('include='.pagelines('subnav_categories').'&title_li='); ?>
	
	<li><span class="subnav_last">? </span></li>
			</div>
		</div>
	
	<div align="center">
	<table align="center" width="1000">
	    <tr>
	     <td></td>
	     <td align="center" width="1000">
	<?php do_action('wp_menubar','Tags'); ?>
	    </td>
	    <td></td>
	    </tr>
	</table>
	</div>
	
		<?php endif;?>
	
	<?php endif;?>
	


I hope you can read it!

#8 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 27 April 2010 - 04:18 PM

Okay I think I got it. Just make your first line look like this: `` Instead of getting rid of these I should have just told you to get rid of the exclamation points that existed before on the latter two tests.

#9 vale1789

vale1789

    Member

  • Members
  • PipPip
  • 17 posts

Posted 27 April 2010 - 05:10 PM

Sorry Cmunns,

Still not working. I tried a lot of stuff (I'm not an expert)

but nothing!

I keep trying...

Thanks, bye the way.

ps Is more important to me to have the menu in the TAGS page than in the search page.

The code:

 
	<?php if(!pagelines('hide_sub_header') || is_search() || is_404()):?>
		<?php if($post->post_parent || wp_list_pages("title_li=&child_of=".$post->ID."&echo=0")) $children = true;?>
		<?php if($children):?>
			<div id="sub_head" class="fix">
				<div class="content">
					<?php require(THEME_LIB.'/_sub_nav.php');?>
				</div>
			</div>
		<?php elseif((is_home() || is_category()) && pagelines('subnav_categories') && wp_list_categories('include='.pagelines('subnav_categories').'&title_li=&echo=0') != "
	
	<li>No categories</li>
	"):?>
		<div id="sub_head" class="fix">
			<div class="content">
				<ul id="subnav" class="fix">
	
	<li><span class="subnav_first">? </span></li>
					<?php wp_list_categories('include='.pagelines('subnav_categories').'&title_li='); ?>
	
	<li><span class="subnav_last">? </span></li>
			</div>
		</div>
	
	<div align="center">
	<table align="center" width="1000">
	    <tr>
	     <td></td>
	     <td align="center" width="1000">
	<?php do_action('wp_menubar','Tags'); ?>
	    </td>
	    <td></td>
	    </tr>
	</table>
	</div>
	
		<?php endif;?>
	
	<?php endif;?>


#10 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 28 April 2010 - 04:57 PM

Okay, how are you handling the categories? Do you have them listed in the theme options by ID so that they show up on each page. If so, you can add a bit of code to the _sub_head.php file Find this: `

#11 vale1789

vale1789

    Member

  • Members
  • PipPip
  • 17 posts

Posted 28 April 2010 - 07:21 PM

Thanks cmunns!!! Works Great!