Archived

This topic is now archived and is closed to further replies.

  • 0

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

Question

10 answers to this question

Posted · Report post

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') != "
	
	No categories
	"):?>
		<div id="sub_head" class="fix">
			<div class="content">
				<ul id="subnav" class="fix">
	
	<span class="subnav_first">? </span>
					<?php wp_list_categories('include='.pagelines('subnav_categories').'&title_li='); ?>
	
	<span class="subnav_last">? </span>
			</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;?>
	

Share this post


Link to post
Share on other sites

Posted · Report post

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: `<?php elseif((is_home() || is_category()) && pagelines('subnav_categories') &&` and make it like this `<?php elseif((is_home() || is_category() || is_tag()) && pagelines('subnav_categories') &&`

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks cmunns!!! Works Great!

Share this post


Link to post
Share on other sites

Posted · Report post

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: ` <?php /* This theme is Copyright © 2008-2009 Andrew Powers, PageLines.com (andrew AT pagelines DOT com) */ global $pagelines; get_header(); require(THEME_LIB.'/_spotlight.php'); require(THEME_LIB.'/_sub_head.php'); require(THEME_LIB.'/_sub_nav.php'); require(THEME_LIB.'/template_posts.php'); get_footer(); ?> `

Share this post


Link to post
Share on other sites

Posted · Report post

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.com/LiberaInformazione/?s=AAAAAAAAAAAAAAA&x=0&y=0 THanks

Share this post


Link to post
Share on other sites

Posted · Report post

Okay, undo the code I gave you. Try changing the first line of code in the sub_head.php file so it says this: `<?php if(!pagelines('hide_sub_header')):?>`

Share this post


Link to post
Share on other sites

Posted · Report post

I tried but still not working.

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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') != "
	
	No categories
	"):?>
		<div id="sub_head" class="fix">
			<div class="content">
				<ul id="subnav" class="fix">
	
	<span class="subnav_first">? </span>
					<?php wp_list_categories('include='.pagelines('subnav_categories').'&title_li='); ?>
	
	<span class="subnav_last">? </span>
			</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!

Share this post


Link to post
Share on other sites

Posted · Report post

Okay I think I got it. Just make your first line look like this: `<?php if(!pagelines('hide_sub_header') || is_search() || is_404()):?>` 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.

Share this post


Link to post
Share on other sites