Jump to content
Sign in to follow this  
vale1789

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

Recommended Posts

cmunns

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
vale1789

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
cmunns

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
cmunns

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

Share this post


Link to post
Share on other sites
vale1789

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
cmunns

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
vale1789

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
cmunns

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×