Disclaimer: I know this isn't a Wordpress site, but I'm posting this in the PHP section because my question may require a some advanced php scripting... and Wordpress. :D
ok so I'm wanting to design a site that will have children to parent pages. The normal nav will be in a "index_sidebar.php". On top of that, I will want the links of the children to appear on a "inside_sidebar.php". (inside "pages" will look different than the
To further explain my, I've created a framework. Here's a http://img200.imageshack.us/i/capturerwb.jpg/ of what I'm trying to do. The blue is the parent nav and the red is WHERE the children nav will be (ignore the stuff that is there now).
Only 3 pages have children, so I'm wondering if there's a cool/easy WP-php tag I could throw where the children nav would be that would ask the parent nav:
if there's children, show here; if not, show nothing and allow the 'recent comment' box to move up in place
It may be a stretch asking for that, but I thought check. Any help would be MUCH appreciated.
"This code will show the child pages, and only the child pages, when on a parent or on one of the children. This code will not work if placed after a widget block in the sidebar."
I just checked an old client site and this was exactly the code I used. Wordpress will even throw in the classes for you for highlighting current pages etc. So yes, you shouldn't have any problems.
My problem is <?php the_title(); ?>. I want the title of the parent to show instead of the child. This way when choosing a child, the parent title exists the same in the H3 that i have there.
I know there's gotta be something like post_parent_title, but I'm just not sure.
I was just about to post some code, but then realized you already had it in there. It has to be something very simple, I feel like I'm overlooking something.
ok so I'm wanting to design a site that will have children to parent pages. The normal nav will be in a "index_sidebar.php".
On top of that, I will want the links of the children to appear on a "inside_sidebar.php". (inside "pages" will look different than the
To further explain my, I've created a framework.
Here's a http://img200.imageshack.us/i/capturerwb.jpg/ of what I'm trying to do.
The blue is the parent nav and the red is WHERE the children nav will be (ignore the stuff that is there now).
Only 3 pages have children, so I'm wondering if there's a cool/easy WP-php tag I could throw where the children nav would be that would ask the parent nav:
It may be a stretch asking for that, but I thought check.
Any help would be MUCH appreciated.
-Eric
"This code will show the child pages, and only the child pages, when on a parent or on one of the children. This code will not work if placed after a widget block in the sidebar."
Clicky for source
I'll try it out today, if I have a chance.
THANK YOU!
So yes, you shouldn't have any problems.
But....
The title of the parent page is now what I'm after..
Here's my current code:
My problem is <?php the_title(); ?>. I want the title of the parent to show instead of the child. This way when choosing a child, the parent title exists the same in the H3 that i have there.
I know there's gotta be something like post_parent_title, but I'm just not sure.
Any ideas? Help!
Thanks!
This is the one I used....
http://www.tammyhartdesigns.com/tutorials/wordpress-how-to-display-the-parent-page-title-in-your-title-meta-tag/
Here's some others...
http://wordpress.org/support/topic/270336
http://www.tammyhartdesigns.com/tutorials/wordpress-how-to-list-child-pages-in-sidebar/
http://www.fldtrace.com/wordpress/how-to-display-parent-page-title-in-wordpress
Whem I'm on the parent, I want the parent title to show up in my nav, but it's not.
This is the code I'm using.
Here's a link to the site itself... http://www.ericdmunoz.com/dhe/summer-programs/
You'll notice that there's a spot for an h3, but it won't show up until you click on a child.
Any ideas how to have my cake and eat it, too?
I was just about to post some code, but then realized you already had it in there. It has to be something very simple, I feel like I'm overlooking something.
PLEASE let me know if you come up w/ something....
Maybe a "parent_title" ?
I just took out the "if" statement...
Thanks in advanced!
Thanks
Shovan