Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)
  • Sorry for all the replies, but I think I found how to do what I wanted to do. Let me first explain the situation.

    -WP 2.1 installation
    -Using a ‘static’ page as the home page (new to WP 2.1)
    -The second link in the header menu (News)is the “blog” section
    -The remaining static pages have multiple child pages

    I wanted to display the child page links on the sidebar only when one of the parent page links on the header menu were clicked. I also wanted to show all of the links for the child pages as you clicked through them. Furthermore, I wanted to show a header title above the links that showed the name of the parent page.

    The only caveat, which is the problem I kept running into with some of the other solutions on this thread, is that I did not want to show any parent page names on the “home” and “news” pages of the site. For example, with one solution I clicked on the news/blog section and the top post title was showing on the top of the sidebar.

    So, here is the solution I came up with. It’s a lot of trial and error (I’m not a programmer). If anyone can think of a better way to do this then please suggest it. As it stands, I’m going to have to make manual changes here as I add pages. BTW, I’m also running this in a PHP Sidebar Widget (ExecPHP).

    https://www.bygraceforglory.com

    <?php
    if (is_page('2')) {
    echo "<h2>About</h2>";
    } elseif (is_page('18')) {
    echo "<h2>About</h2";
    } elseif (is_page('19')) {
    echo "<h2>About</h2";
    } elseif (is_page('20')) {
    echo "<h2>About</h2";
    } elseif (is_page('21')) {
    echo "<h2>About</h2";
    } elseif (is_page('22')) {
    echo "<h2>About</h2";
    } elseif (is_page('5')) {
    echo "<h2>Ministries</h2";
    } elseif (is_page('16')) {
    echo "<h2>Ministries</h2";
    }
    ?>
    <?php
    global $wp_query;
    if( empty($wp_query->post->post_parent) ) {
    $parent = $wp_query->post->ID;
    } else {
    $parent = $wp_query->post->post_parent;
    }
    ?>
    <ul>
    <?php wp_list_pages("title_li=&child_of=$parent"); ?>
    </ul>

    Kafkaesqui, on your post dated 2006-10-08 01:13:52, I am trying to use that code and it seems to work…until I click on one of the child pages. Then I get the following error:

    Fatal error: Call to a member function on a non-object in /home/bygra2/public_html/wp-content/plugins/widgets/execphp.php(24) : eval()'d code on line 9

    I am using the following to show child pages…

    <?php
    global $wp_query;

    if( empty($wp_query->post->post_parent) ) {
    $parent = $wp_query->post->ID;
    } else {
    $parent = $wp_query->post->post_parent;
    }

    wp_list_pages("title_li=<h2>Subpages</h2>&child_of=$parent");
    ?>

    How can I set it so that the parent page title precedes the heading of Subpages?

    For example:

    About Subpages
    -Vision
    -Mission
    -Strategy

    This just started happening to me, too.

    1) I receive comment moderation notices via email.
    2) I do not receive approved comment email notices.
    3) I also receive no notice for moderation on trackback spam.

    I have tried switching email accounts and the problem persists. I am also running three separate iterations of WordPress, but they all use the same MySQL database (with different prefixes on the tables). Therefore, I don’t think it’s an issue with any of the WordPress PHP files as speculated earlier in this thread? Could it be a problem on the server/host side?

    Yeah, the last time I tried it kept screwing up my install, so I finally quit and just started creating new content going forward. As a last recourse, if I ever get the time, I’ll manually move the content using PHP MyAdmin…but it’d sure be nice if they could fix the import.

    I am also using the Codex instructions for putting the Asides on the sidebar…and running into the same problem. I have my blog set to display 7 posts. I get five Posts on the main content and two Asides on the sidebar.

    Somthing else in the mix that I have not seen anyone mention is that I am also displaying the latest posts in the sidebar. If I go from showing 10 posts to 5, then my Asides drop from 2 to 1. This seems to be because only 1 of the 5 “Latest Posts” are categorized as Asides.

    Any suggestions on how to proceed? I would like the asides to display independently.

    jonimueller, mabye I need to upgrade WP and get the latest import-textpattern.php file? I am running 1.5.1.3 version.

    I’ve been searching the forum for help on my topic..and after an hour this seems like the best thread to post to. I used the tips above to determine that my ARCHIVE page is using kubrickbg.jpg. I would expect it to use kubrickbgwide.jpg, because the class in the archives.php file is “widecolumn” and there is no call for a sidebar.

    All I’ve done to the template relative to the image files is replace them with my own, so just to be safe I verified that the “wide” image is all white (no grey bar).

    Why is the “if” statement in header.php pulling in the wrong background on the ARCHIVE page? It shouldn’t have the grey sidebar. My archive page is here:

    https://www.transformatum.com/?page_id=198

    *Bump*

    In all seriousness, while I like WP over TXP, I have found the user community over there to be much more helpful and supportive. Are there not enough developers on this forum, or are there simply too many threads to keep up with?

    I’m 99.9% postive that I have the correct db info in the import-textpattern.php and import-textpattern2.php files. However, both result in errors (which happen to corrput part of the db). I’m running the latest version of WP and version 1.01rc1 of Textpattern.

    I should also add that the original textpattern import results in multiple SQL errors, but I appear to have all the database information correctly in place.

    Sillybean, I’m trying your import script and it keeps dying with the message “Couldn’t get categories.” Any ideas?

    Thread Starter skennedy1217

    (@skennedy1217)

    I had a programmer friend help me with this (setting topic as “resolved”).

    Thread Starter skennedy1217

    (@skennedy1217)

    I figured out that I can cut and paste my Blogkomm comments (from comments.txt) into a Haloscan export file (XML format). The IP addresses are missing, though, so I don’t know if that will cause problems. I may also just use the same date/time for all of them, because there in two different formats.

    However, I’ve got about 400 comments and don’t want to do this manually. I don’t think there’s a script out there to automate the conversion (I’ve searched a lot), but would it be difficult to write (of course I’m asking for help, as I don’t know how to write code)?

    Thread Starter skennedy1217

    (@skennedy1217)

    *bump*

    BTW, the blogkomm comments are stored in a text file and not in a database.

Viewing 14 replies - 1 through 14 (of 14 total)