View All Posts in Category Externally
-
I want to view all the posts in a category on an external page in the same domain. I figured it out but I get an error message on the page that is displaying the content. How do I get rid of this error message. I am not too familiar with php but I am trying. Here is the code at the beginning of my page:
<?php
// Include WordPress
define(‘WP_USE_THEMES’, false);
require(‘./wordpress/wp-blog-header.php’);
global $wp_query;
query_posts(
array_merge(
array(‘cat’ => 3),
$wp_query->query
)
);
?>here is the code in the content box to display the content:
<?php while (have_posts()): the_post(); ?>
<h4><?php the_title(); ?></h4>
<?php the_content(); ?>
<?php endwhile; ?>here is the error message i get at the to of the page:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /hermes/bosweb/web297/b2972/ipw.mcondiff/public_html/index.php on line 10
Any help would be great!
Thanks!
Austin
- The topic ‘View All Posts in Category Externally’ is closed to new replies.