WordPress.org

Ready to get started?Download WordPress

Forums

Combining PHP Code (6 posts)

  1. Cregy
    Member
    Posted 8 years ago #

    Hi

    Could someone please explain how I might combine tags.
    This is the current tag:
    <?php wswwpx_fold_page_list ('title_li=<h2>Pages</h2>'); ?>
    and I would like to add this tag:
    ('sort_column=menu_order')
    Everytime I try I get parse error!

    Thanks for the help.

    Rich

  2. Cregy
    Member
    Posted 8 years ago #

    Bump - can anybody help please.

    Thanks

    Rich

  3. moshu
    Member
    Posted 8 years ago #

    You should ask the plugin's author, since what you posted is not a standard WP template tag.

  4. Kafkaesqui

    Posted 8 years ago #

    Try

    <?php wswwpx_fold_page_list ('sort_column=menu_order&title_li=<h2>Pages</h2>'); ?>

    This claims the plugin supports all arguments for wp_list_pages(), so it *should* work.

  5. roblgs
    Member
    Posted 8 years ago #

    Hi Rich,

    I've tested this aspect of functionality against version 1.5, but not beta 2 yet... For 1.5 at least it works as advertised... in fact, since the arguments are passed directly through to Wp's internal 'get_pages' function, there is no reason for it not to work.

    I'm assuming that you have set the 'page order' field according to the sequence you want... if that is not set then all pages have the same page order, the sorting will be based on their id number, and the ordering may be very different from expected/wanted.

    Let me know if you have more specific description of the problem.

    Best regards

    Rob

  6. Cregy
    Member
    Posted 8 years ago #

    Hi Rob and All

    Thanks that has worked perfectly. For those that want to view the completed menu in action visit:
    http://www.lostwithiel.org.uk/

    I have used the fold-page list which reduces the pages list to simply the parent, then I have sorted by page order field and also added the page title.

    My next application will be to get the page parent to output in bold!

    Thanks

    Rich

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags