• Hi there,

    excellent theme, very useful, really.
    One litte thing: “order by” of widget “child pages” can’t work.
    Because “order_by” is no valid parameter for get_pages().
    Changing suffusion-child-pages.php #45 did it:
    // ‘order_by’ => $order_by,
    ‘sort_column’ => $order_by,

    Regards,
    Martin

Viewing 15 replies - 1 through 15 (of 18 total)
  • You may want to also post this on Suffusion’s dedicated site:

    https://aquoid.com/news/themes/suffusion/

    Thread Starter pmsadmin

    (@pmsadmin)

    If that makes you happy – okay, did it. ??

    I never ever had a problem with Child Pages widget of suffusion.
    Works perfect for me on more than one site.

    Thread Starter pmsadmin

    (@pmsadmin)

    Shure, why should you have problems?
    It’s only related to sort subpages, e.g. by “menu order”.
    Does that work for you?

    Yes see this page on the right hand side.
    The “Supplier information” are the child pages ordered by menu order.
    So I don’t quite understand “One litte thing: “order by” of widget “child pages” can’t work.”

    Thread Starter pmsadmin

    (@pmsadmin)

    Strange, I just switched back to the original code – and I loose the menu order.

    But look to the code of suffusion-child-pages.php,
    There’s a branch by using the list style and something other.
    And with the list style you get the default “menu_order”.
    Just try to change that…

    The parameter has to be sort_column and not order_by:

    $page_args = array(
    // changed by me from order_by to sort_column
    // ‘order_by’ => $order_by,
    ‘sort_column’ => $order_by,
    […]
    );
    […]
    if ($post_style == ‘list’) {
    $pages = wp_list_pages($page_args);
    if (!$show_if_empty && trim($pages) == ”) {
    return;
    }
    }
    else {
    $page_list = get_pages($page_args);
    if (!$show_if_empty && count($page_list) == 0) {
    return;
    }
    }

    And codex says:

    <?php wp_list_pages( $args ); ?>
    Default Usage
    <?php $args = array(
    […]
    ‘sort_column’ => ‘menu_order, post_title’,
    […]
    ); ?>

    <?php get_pages( $args ); ?>
    Default Usage
    <?php $args = array(
    […]
    ‘sort_column’ => ‘post_title’,
    […]
    );

    I tried to re-order different ways: ascending vs descending, and a few other options. And the order did NOT change, so it seems you’re right.
    Can’t help you with PHP I am afraid, I’ll take your word for it.

    I love this template. One thing I cannot figure out, though, is how to change the heading “Pages” to something like “Info Pages” or “Blog Info”. Most of my readers do not seem to realize what “Pages” means so I want to clarify it.
    If this change can be made, please let me know how.
    Thanks!

    If you mean that the title of the list of child pages says Pages, then the solution is simple.
    Edit the title of the widget, ie change it from [suffusion-the-post display='title'] to Blog info.

    Dear John,
    I appreciate your help and that simple tip but as far as I can tell I am not using the Pages widget. When I looked in my “Widgets” area no Pages widget is active even though I have 7 “Pages” featured on the blog right now. I do have 2 “inactive” Pages widgets and one “Pages” widget in the “Available” box but nothing active in the far right column.
    I can’t figure this out. Also there is a blank widget appearing above my top Google Ad that I cannot eradicate.
    The site is here:
    https://fitzvideo.com/sky_surfing/
    If you have a moment to look at it I would appreciate your analysis.
    BTW, I am using the Suffusion Template.
    Thanks.

    Go to
    /wp-admin/nav-menus.php
    You should have a menu there (menu above header) You can edit any of the links etc.
    If that is not how you built your menu, then go to
    /wp-admin/themes.php?page=suffusion-options-manager&tab=theme-options-visual-effects.php
    and find “Pages” tab title
    You should be able to choose it there (you might have to get your head around some of the other settings on that page)

    Regarding the blank widget, I haver no idea really.
    It looks like you should be able to delete the first widget in your sidebar from the widgets page?

    Or maybe something here:
    wp-admin/themes.php?page=suffusion-options-manager&tab=theme-options-sidebars-and-widgets.php

    Thanks, John. That did the trick. It is now “Blog Info”.
    Did you happen to have any idea what that “faux widget” is at the top of my right column?
    I can’t find where it came from.

    fitzvideo.com/sky_surfing/

    Forget that last input. I just saw your email response.

    In answer to your response…
    That’s the weird thing. In the widgets panel under “Appearance”, the very first widget is the one called “Display Add in Sidebar” (the GoogleAd widget – should be “Ad”).
    Above that there is nothing.
    Maybe the misspelling of “Ad” is a clue and these guys have a bug in their widget…

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘widget "child pages" order_by broken’ is closed to new replies.