Jump to content
Sign in to follow this  
leah

Subnav on Blog Page WHP3

Recommended Posts

leah

I amended header.php to put the subnav directly under the nav menu (instead of under the feature/highlight box). However, on my blog page the subnav does not show up. I'd like it to be there - what am I missing? BTW thank you guys for all your help holding my hand through this - i've used wordpress for years, but this is the first time i've modified so much CSS and PHP myself. I have a couple of good books I'm using, but your help has been phenomenal (as is this theme!).

Share this post


Link to post
Share on other sites
cmunns

In the THEME OPTIONS > HEADER AND NAV you just have to add the sub-category ID's to get them to appear on the index page. You'll see what I'm talking about.

Share this post


Link to post
Share on other sites
leah

Hmm. My subnav bar contains pages, not categories. Will page ID's work as well?

Share this post


Link to post
Share on other sites
bryan-hadaway

It could very well, go ahead and try it and let us know. Thanks, Bryan

Share this post


Link to post
Share on other sites
leah

Nope. did not work. Other thoughts?

Share this post


Link to post
Share on other sites
cmunns

Well I guess we can continue to just make you a PHP guru and modify the function? Take a look at _sub_head.php and let me know if it looks too overwhelming. It will be just an extra conditional on line 9 that should do the trick

Share this post


Link to post
Share on other sites
leah

oh that should be no problem - i've already modified the templates_post.php and header.php :-) what's the line I need to add?

Share this post


Link to post
Share on other sites
bryan-hadaway

Hold tight for a developer to get back to you... Thanks, Bryan

Share this post


Link to post
Share on other sites
leah

no worries . . . this has been fun figuring all this stuff out!

Share this post


Link to post
Share on other sites
cmunns

Leah, Love how your site is looking! I haven't tested this, but if you make line 9 look like this: `<?php if($post->post_parent || wp_list_pages("title_li=&child_of=".$post->ID."&echo=0") || is_blog()) $children = true;?>` that should work

Share this post


Link to post
Share on other sites
leah

ok, that actually makes sense. Thanks for the comments! I am liking the site too. I'm working with the temple on their branding and what you see 2 months from now is going to be very different, but the color scheme and layout/nav function will be quite similar to what I have now. Gotta say, this theme makes this sooooooo easy. It's SUCH a functional theme. Not that I don't love Genesis, which I do, but I'm not (clearly) a code person, and this theme ROCKS in that department with all the different page templates and options. I'm running to a meeting and I'll try modifying the template later this afternoon and I'll let you know.

Share this post


Link to post
Share on other sites
leah

Ok, sooooo that made the whole blog page disappear . . .

Share this post


Link to post
Share on other sites
bryan-hadaway

You'll have to hold tight for Adams continued help on this one. Thanks, Bryan

Share this post


Link to post
Share on other sites
leah

no worries. got tons of content to get in there in the mean time.

Share this post


Link to post
Share on other sites
cmunns

Maybe a better solution is to copy this: `

<?php require(THEME_LIB.'/_sub_nav.php');?>
` over this portion: `
  • <?php wp_list_categories('include='.pagelines('subnav_categories').'&title_li='); ?> <?php if(!is_page_template('page-highlight.php') && !pagelines('hidesearch')) include (THEME_LIB . '/_searchform.php'); ?>
` (LINE 16)

Share this post


Link to post
Share on other sites
leah

nope, sorry. hmmm. what is the name of the blog template in the "library" file?

Share this post


Link to post
Share on other sites
cmunns

Typically index.php is what controls the main blog page, but we have it organized differently so each template doesn't have to be changed. I'm wondering if you leave the code as it was and replace wp_list_categories with wp_list_pages it will use page IDs instead of cat IDs in the theme options ? Do you know what I'm getting at?

Share this post


Link to post
Share on other sites
leah

ok, that did not work. so if you don't use index.php what is the template for the blog post page? i'm taking one of my kids to the dentist (occupational hazard of being a WAHM :-)) and then I'll try a few ideas i have later. thanks for all your help!

Share this post


Link to post
Share on other sites
bryan-hadaway

Okay, keep us updated. Thanks, Bryan

Share this post


Link to post
Share on other sites
leah

Ok, so nothing I've tried works. Where is the template for the blog post page?

Share this post


Link to post
Share on other sites
Andrew

Hey Leah, Took a look for you... To fix: in this file: _sub_head.php (inside library folder) find this line: `<?php elseif(!pagelines('hide_sub_header')):?>` and change to `<?php elseif(!pagelines('hide_sub_header') || is_home()):?>` It should fix it for you.... The subnav on the main blog page is designed to work only with categories that are added in the theme option (re: blog subnav categories or something to that effect)

Share this post


Link to post
Share on other sites
leah

oh man I"m so sorry that did not work.

Share this post


Link to post
Share on other sites
leah

Ok, I'm going to do something else with the blog page and just scrap the whole "i need a subnav here" thing :-) aaannnnnd I have "enable drop-down navigation" checked, BUT NO DROP DOWN what did I mess up when I was fooling around with code???

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  

×