Support » Plugin: qTranslate X » wp_list_pages problem

  • Resolved elsnare

    (@elsnare)


    Hello! So I’m using the code:

    <?php
     $id = get_the_ID();
    wp_list_pages("title_li=&depth=1&child_of=$id"); ?>

    To show a list of child pages of the current parent.

    The problem:
    With “hide content not av. in other languages” ticked, the list will not show. It works fine when I disable the option in the settings.

    So I wonder what seems to be the problem. Any ideas?

    https://wordpress.org/plugins/qtranslate-x/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Gunu

    (@grafcom)

    @elsnare,

    Posts problem solved…. now page problem?

    Can you show me an example?

    Exacly 🙂
    Well there is not much to show. When checking the “hide content” check-box the post list dissipaters (generated through wp_list_pages as in the above code). It vanishes in all languages, no errors.

    When disabling the checkbox – the list is visible again.

    I tried re-writing the code to use wp_query, but it does not support the “depth” parameter.

    At this point I will probably switch to standard wp menus for the sub-pages navigation.

    Plugin Author John Clause

    (@johnclause)

    @elsnare: are you sure those pages have content? They are supposed to be hidden if the main content is empty for the active language.

    @john Clause
    I’m 100% sure. When enabling the check-box the list simply vanishes (even the content in the base language). It seems like wp_list_pages returns nothing.

    I re-written the code using get_pages(); – the pages appear, they are translated but the “empty” ones for a given language don’t disappear. I get the standard “(language name) page name” output.

    Also checked after the language fix from the other topic – no effect.

    Plugin Author Gunu

    (@grafcom)

    !elsnare,

    Try – Appearance – Widgets – widget Pages – Sort by Page title

    Tested it here: Empty post not listed, empty pages also not listed.

    Plugin Author John Clause

    (@johnclause)

    @elsnare: if this is a case, then there is something very special about your installation. I am not sure how we can troubleshoot it, unless you give us admin access to a test-copy of your site, which shows the trouble. Use qtranslateteam at gm ail d c om, if you decide to do so.

    @john
    Hi John, back on track after the weekend 🙂
    I did check the page’s widget as you suggested – no output, not even the title for the widget block.

    As for troubleshooting, try pasting the code in the template file, with the “hide content” check-box enabled. Does this code print a list for you?

    <ul>
    <?php wp_list_pages('title_li='); ?>
    </ul>

    Plugin Author John Clause

    (@johnclause)

    Yes, it does print the pages as expected. Which version do you use? Try the latest from GitHub, for example, https://github.com/qTranslate-Team/qtranslate-x/archive/3.2.9.8.4.zip.

    Plugin Author John Clause

    (@johnclause)

    I assume it is resolved?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘wp_list_pages problem’ is closed to new replies.