wp_get_archives doesn't work as array
-
wp_get_archives works unless I try to output it to an array. If I do that I get this error:
Warning: Invalid argument supplied for foreach() in /home/dotswoof/public_html/beta/wp-content/themes/swoof/archive.php on line 92
Here is the link:
http://www.dotswoof.com/beta/?page_id=68Here is the code:
$args = array( 'type' => 'postbypost', 'format' => 'link', 'show_post_count' => false, 'echo' => 0 ); $archive = wp_get_archives($args); foreach ($archive as $post) { echo $post->post_name; }I don’t know why this isn’t working and I’m on a deadline. Any help would be greatly appreciated.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘wp_get_archives doesn't work as array’ is closed to new replies.