• Hi!

    I’ve made an additional type of page called “mall” using the plug in More types. I’m trying to list child pages of a page using the following code:

    `<?php
    $postid = get_the_ID();
    $args = array(
    ‘post_type’ =>’mall’,
    ‘title_li’ => null,
    ‘depth’ => 0,
    ‘child_of’ => $postid); ?> `

    It lists the child pages but with the wrong URL!

    Eg:
    it uses:
    https://localhost/wordpress/?page_id=169
    instead of the correct url:
    https://localhost/wordpress/?mall=asdasdasd

    I’ve tried to fix this for hours but it just wont work :(! Any ideas?

Viewing 1 replies (of 1 total)
  • Thread Starter wert790

    (@wert790)

    Of course i also have the code wp_list_pages($args); where the list of pages should be. I forgot to write that in the post.

Viewing 1 replies (of 1 total)
  • The topic ‘wp_list_pages wrong URL, why??’ is closed to new replies.