ibu
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Escaping SSL via dynamically generated lists in WidgetsAny help would be appreciate. Thank you.
Forum: Fixing WordPress
In reply to: Should be easy.. Background changeHi there!
If you don’t have firebug installed, you should definitely do so. It can shed light on all of these css issues for you by giving you the location of the css file associated with a particular piece of html. It’ll even tell you the line of the css document that you need to look in.
There are a couple of issues at hand here. First, the css you’re trying to write at top is incorrect. But we’ll address that in a second. Firs you need to locate where the CSS file with the correct body declaration is located. Here is where you can find it:
https://www.hdolsen.com/wp-content/themes/bueno/styles/default.css
on Line 11, find:
body { background: url("default/bodytile.jpg") }
The url() is where the background image is located. To remove it and change it to a white background, simply make it:
background: #fff;
Hope this helps!
Forum: Fixing WordPress
In reply to: Displaying child pages using wp_list_pages and phpThank you so much for your help MichaelH. I hope our discourse here can help other people in the future.
Forum: Fixing WordPress
In reply to: Displaying child pages using wp_list_pages and phpMichaelH yours works swimmingly.
Here is the fix I came up with based on this post:
<?php global $post; $thispage = $post->ID; // grabs the current post id from global and then assigns it to thispage ?> <?php $pagekids = get_pages("child_of=".$thispage."&sort_column=menu_order"); // gets a list of page that are sub pages of the current page and assigns then to pagekids ?> <?php if ($pagekids) { // if there are any values stored in pagekids and therefore the current page has subpages ?> <ul> <?php wp_list_pages("depth=1&title_li=&sort_column=menu_order&child_of=".$thispage); // display the sub pages of the current page only ?> </ul> <?php } else { // if there are no sub pages for the current page ?> <ul> <?php echo wp_list_pages('title_li=&child_of='.$post->post_parent.'&echo=0'); ?> </ul> <?php } ?>
Forum: Fixing WordPress
In reply to: Displaying child pages using wp_list_pages and phpHaha Michael I stumbled upon a solution as soon as you posted yours! I’m going to test yours as well to see if we both are viable solutions in case someone else can benefit.
Forum: Fixing WordPress
In reply to: Displaying child pages using wp_list_pages and phpMichaelH,
First off, thank you for your help. Unfortunately the output on the partner profile pages is the same as the example code from that you linked to. It’s possible I’ve made a mistake, so here’s the code I’m using:
<?php $partner_id = 26; // "partner" page id = 26 if($post->post_parent && $post->parent != $partner_id) $children = wp_list_pages("&title_li=&child_of=".$post->post_parent."&echo=0"); else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); if ($children) { ?> <ul> <?php echo $children; ?> </ul> <?php } ?>
And here are example pages: Cindy’s top level profile page Cindy’s admissions page.
Forum: Fixing WordPress
In reply to: Displaying child pages using wp_list_pages and phpI think I need to test for something other than post_parent.
I could do something like:
<?php if($post->is_page('42,23,44,11')) $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0'); if ($children) { ?> <ul> <?php echo $children; ?> </ul> <?php } ?
But I’d like to keep things dynamic so if they have to add a page later they won’t have to have us do it for them. Am I on the wrong track?
Forum: Fixing WordPress
In reply to: Displaying child pages using wp_list_pages and phpWow that made absolutely no sense.
Both of the pages are CHILDREN is what I meant, so they display the information of their parent.
Forum: Fixing WordPress
In reply to: Displaying child pages using wp_list_pages and phpI thought so too but that doesn’t work because it displays the sub pages of the parent. Because of the page hierarchy, the pages are both parents, so you get a top level menu when looking at a person’s profile. When you click on the sub, sub menu items, the correct information is displayed but if you are on the top level profile page for someone, it’s sub pages are displayed.
Forum: Fixing WordPress
In reply to: Displaying child pages using wp_list_pages and phpQuick bump in case anyone has time to reply today.
Forum: Fixing WordPress
In reply to: Displaying child pages using wp_list_pages and phpI should also mention that I’ve read the wp_list_pages codex page and tried to work with the examples to no avail. If the answer is there I missed it due to a low understanding of php and not for a lack of effort, haha.
Forum: Fixing WordPress
In reply to: Displaying child pages using wp_list_pages and phpI lied, The Example Page Hierarchy is this:
- Our People
- Partners
- Michael McConnell
- Areas of Practice
- Education
- Awards
- Etc