Error when passing $args to wp_list_pages()
-
This is my code:
<?php
$args = array(
‘show_option_all’ => ”,
‘orderby’ => ‘name’,
‘order’ => ‘ASC’,
‘show_last_update’ => 0,
‘style’ => ‘list’,
‘show_count’ => 0,
‘hide_empty’ => 1,
‘use_desc_for_title’ => 1,
‘child_of’ => 0,
‘feed’ => ”,
‘feed_type’ => ”,
‘feed_image’ => ”,
‘exclude’ => ”,
‘exclude_tree’ => ”,
‘include’ => ”,
‘hierarchical’ => true,
‘title_li’ => __( ‘Categories’ ),
‘number’ => NULL,
‘echo’ => 1,
‘depth’ => 0,
‘current_category’ => 0,
‘pad_counts’ => 0,
‘taxonomy’ => ‘category’,
‘walker’ => ‘Walker_Category’ );
?>
<?php wp_list_pages($args); ?>And I’m getting this error from it:
Fatal error: Using $this when not in object context in C:\wamp\www\lessons\wp-includes\classes.php on line 912
Any ideas why? :<
- The topic ‘Error when passing $args to wp_list_pages()’ is closed to new replies.