Having issue with wp_list_pages
-
Hi
I’m having an issue with my custom post type. I have a custom post type having parent child relationship. I’m using the following code to bring back all the posts for explanatory-material:wp_list_pages('title_li=&echo=0&sort_order=ASC&post_type=explanatory-material');
This works fine as long as I’m logged in and an Administrator. But as soon as I log out wp_list_pages returns an empty string.
This is how I’m registering my custom post type:
register_post_type('explanatory-material', array( 'labels' => array( 'name' => 'Explanatory Materials', 'singular_name' => 'Explanatory Material', 'add_new' => 'Add new Explanatory Material', 'add_new_item' => 'Add new Explanatory Material', 'edit_item' => 'Edit Explanatory Material', 'view_item' => 'View Explanatory Material' ), 'public' => true, 'menu_position' => 11, 'menu_icon' => 'dashicons-media-document', 'supports' => array('title', 'author', 'editor', 'revisions', 'excerpts', 'thumbnail','custom-fields', 'page-attributes'), 'show_ui' => true, 'hierarchical' => true, 'rewrite' => array('slug' => 'explanatory-material/item', 'with_front' => false), ));
If I turn of memberhship plugin it starts to work fine but for some reason it is blocking explanatory material (my custom post type) using wp_list_pages.
Any help will be much appreciated
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘Having issue with wp_list_pages’ is closed to new replies.